Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member interlaced's Avatar
    Join Date
    Mar 2010
    Location
    New Zealand (Surprise)
    Posts
    22
    Member #
    21435
    Alright I'm assuming this is an easy one to fix but i was wondering whats the best way to go about it with my current code and layout. I just want to make the background images in my navbar clickable, as usual ive attached everything below, cheers.

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    This should do it. Rearranged your CSS a bit too to reduce redundancy.
    Code:
    ul.navbar a {
    	display: block;
    	width: 117px;
    	height: 35px;
    	position:relative;
    	background-repeat: no-repeat;
    }
    .home { background-image: url(Images/Home3.jpg); }
    .news { background-image: url(Images/News.jpg); }
    .products { background-image: url(Images/Products.jpg); }
    .about { background-image: url(Images/About.jpg); }
    .contact { background-image: url(Images/Contact%20us.jpg); }
    .search { background-image: url(Images/search2.jpg); }
    
    
    ....
    
    
    <ul id="navbar">
    <li><a class="home" href="#">&nbsp;</a></li>
    <li><a class="news" href="#">&nbsp;</a></li>
    <li><a class="products" href="#">&nbsp;</a></li>
    <li><a class="contact" href="#">&nbsp;</a></li>
    <li><a class="about" href="#">&nbsp;</a></li>
    <li><a class="search" href="#">&nbsp;</a></li>
    </ul>

  4. #3
    Junior Member interlaced's Avatar
    Join Date
    Mar 2010
    Location
    New Zealand (Surprise)
    Posts
    22
    Member #
    21435
    Thanks heaps smoseley, works a treat.

  5. #4
    Junior Member
    Join Date
    Mar 2010
    Posts
    1
    Member #
    21423
    thanks for the shearing the code


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:09 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com