PDA

View Full Version : Navigation with a background images.



HellBoys
01-08-2007, 03:53 AM
I try to make a navigation menu with css. I have a background images with the size of width:200 px et height:25px and i try to place the button text on the right side and center but i cant figure out the padding and margin option to make it like i whant. Maybe some one cant look i my code and tell me whats wrong.



----CSS----

#main{
float:left;
width:260px;
background:#1e1e1e;
}
#nav{
margin-left:30px;
list-style-type:none;
width:200px;
}

#nav li a{
border-bottom: 2px solide #1e1e1e;
height:25px;
background: url(images/btn_white.png) no-repeat left;
text-align:right;
display:block;
font-size:12px;
font:Verdana;
text-decoration: none;
color:#1e1e1e;
}

#nav li a:visited, .markermenu li a:active{
color: black;
}

#nav li a:hover{
color: #b00000;
}

----html----

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
<title>SectionSix WebTest</title>
<link rel="stylesheet" href="styles.css" type="text/css">

</head>
<body>

<div id="main">
<div id="nav">
<li><a href="#">Home</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Resources</a></li>
<li><a href="#">FAQ</a></li>
<li><a href="#" style="border-bottom-width: 0">Contact</a></li>
</div>
</div>

</body>
</html>


thx for taking the time to check and sorry for my bad english...

yoshi555
01-08-2007, 04:00 AM
I dont get wat your trying to say but if you want a image on your computer for your background here is the code
<body background="image.gif">

HellBoys
01-08-2007, 05:34 AM
I dont whant a background image for my website and dont have probleme with the image. Look at the css code. I whant help to adjust my text in my navigation so it be in the right side and centered.