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
    Member
    Join Date
    Dec 2005
    Location
    Canvey Island, Essex, UK
    Posts
    67
    Member #
    12033
    Hey guys/girls/everyone

    I am trying to write a CSS rollover navigation bar, but I am having a few problems with the way it is presented.

    There is a small gap in between the buttons in IE 7, but there is none in FF3 and Flock. I dont want that gap there, is there a way to remove it.

    Here is a link to a graphical representation to my problem:
    View Image

    Here is my CSS code:

    HTML Code:
        <style type="text/css">
        #navlist1
        {
    		margin-bottom:0px;
            font-family:Arial;
            font-size:.8em;
            font-weight:bold;
            list-style:none;
        }
        
        #navlist1 a
        {
            display:block;
            width:159px;
            color:#fff;
            text-decoration:none;
            background:url("btn_duo_top.png");
            padding-left:75px;
            padding-right:0px;
            padding-top:5px;
            padding-bottom:5px;
            background-repeat:no-repeat;
        }
        
        #navlist1 a:hover
        { 
        background-position:0 -28px;
        color: #1e5ebd;
        }
        
            #navlist2
        {
        	margin-top:0px;
            font-family:Arial;
            font-size:.8em;
            font-weight:bold;
            list-style:none;
        }
        
        #navlist2 a
        {
            display:block;
            width:159px;
            color:#fff;
            text-decoration:none;
            background:url("btn_duo_top-middle.png");
            padding-left:75px;
            padding-right:0px;
            padding-top:3px;
            padding-bottom:3px;
            background-repeat:no-repeat;
        }
        
        #navlist2 a:hover
        { 
        background-position:0 -26px;
        color: #1e5ebd;
        }
    
        </style>
    </head>
    
    
    <body>
    
    <ul id="navlist1">
        <li><a href="#">Home Page</a></li>
    </ul>
    <ul id="navlist2">
        <li><a href="#">Latest Videos</a></li>
    </ul>
    Matthew Stocker
    (X)HTML, CSS, PHP & JavaScript Developer

  2.  

  3. #2
    Junior Member simplewebs's Avatar
    Join Date
    Jul 2008
    Location
    Shanghai
    Posts
    9
    Member #
    17045
    Please set the line-height of the tab as the background image's height.

  4. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    4
    Member #
    17070
    The first thing that strikes me is that you have two different lists for the two links.Why? Pop them both in the same list and that should do the trick as it is likely to be a margin or paddng problem (if not with the UL then the LI).
    Most browsers will merge the borders between list items in the same list so it should go away.

    If you have a live link you can share with us that would be most beneficial.

  5. #4
    Junior Member
    Join Date
    Jul 2008
    Posts
    4
    Member #
    17070
    Please set the line-height of the tab as the background image's height.
    That also looks to be a really good point, espicially as the design of the yellow swooping line doesn't line up, although this might not get rid of the white gap.


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:11 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com