SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why doesn't the bg color change all the way

    http://zaireweb.com/dev/default.html

    When you hover over one of the links, the gray doesn't completely cover the black... why is that?

    (BTW, Thanks Vinnie.. couldn't figure it out myself, so I copied most of the css from your site)

    HTML
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    	
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    	<title>Corporate Testing</title>
    	<link rel="stylesheet" type="text/css" href="default.css" />
    </head>
    
    <body>
    <div id="nav">
    		<ul>
    			<li><a href="/" title="Home">Home</a></li><li><a href="/">Services</a></li>
    		</ul>
    </div>
    </body>
    </html>
    CSS
    Code:
    body {
    	background-color: Green;
    	margin: 0;
    	padding: 0;
    }
    #nav {
    	padding: 0;
    	background-color: #525252;
    }
    #nav ul {
    	margin: 0;
    	padding: 0;
    	
    	list-style-type: none;
    }
    #nav li {
    	margin: 0;
    	padding: 0;
    	display: inline;
    }
    #nav ul li a {
    	background-color: #525252;
    	border-right: 1px solid #e4e4e4;
    
    	margin: 0;
    	padding: 0 5px;
    
    	color: #ffffff;
    		
    	text-decoration: none;
    	font-family: Verdana, Arial, Helvetica, sans-serif;
       font-style: normal;
       font-weight: bold;
    	font-size: 12px;
    }
    #nav ul li a:hover {
    	background-color: #000000;
    	background-repeat: repeat;
    	border-right: 1px solid #e4e4e4;
    	
    	margin: 0;
    	padding: 0 5px;
    	
    	color: #ffffff;	
    }
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  2. #2
    eigo hanasemasu ka? Yes. =) ZuulJin's Avatar
    Join Date
    Dec 2001
    Location
    Japan
    Posts
    655
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You want to learn more than you ever wanted to about CSS and standards compliance? Check out www.alistapart.com . There's even a few articles about using the unordered list to create the menu.

    Good luck.
    U.S. DoD Member in Japan?
    Choose your base. Buy|Sell. Easy
    @ APO Ads.



  3. #3
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,249
    Mentioned
    111 Post(s)
    Tagged
    1 Thread(s)
    remove the padding on the a and the a:hover and you should be OK.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  4. #4
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's actually only making the a: tag turn black - you'll have to use display: block; and give them a little padding so they extend all the way up

  5. #5
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That won't work... it stops the display: inline; from working....
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  6. #6
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    then you need to add 'float: left;' to each link

    Unless someone has a better idea


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •