po3
07-23-2007, 07:01 PM
I need some advise on the css for this horizontal nav bar.
I want the bar to be scalable if the user chooses to make the font bigger. What changes would you suggest to my css to allow this bar to scale better? Currently the background image gets messed up when you the user scales the text.
Sample Nav Bar (http://www.projecto3.com/clients/test/testing.html)
CSS:body {
margin: 0;
padding: 0;
text-align: center;
background-color: gray;
}
ul#mainNav {
padding:0px;
list-style-type:none;
background: url(images/common/navTile.gif) repeat;
width: 100%;
float: left;
}
ul#mainNav li {
float: left;
}
ul#mainNav a {
float: left;
display: block;
padding: 0 1.2em;
line-height: 2.2em;
font: small-caps 1.3em Georgia, "Times New Roman", Times, serif;
color: #dee8ed;
text-decoration: none;
}
ul#mainNav a:hover {
background: url(images/common/navOn.gif) no-repeat 0 0;
color: white;
}
#wrapper {
width: 85%;
margin: 0 auto;
text-align: left;
}
I want the bar to be scalable if the user chooses to make the font bigger. What changes would you suggest to my css to allow this bar to scale better? Currently the background image gets messed up when you the user scales the text.
Sample Nav Bar (http://www.projecto3.com/clients/test/testing.html)
CSS:body {
margin: 0;
padding: 0;
text-align: center;
background-color: gray;
}
ul#mainNav {
padding:0px;
list-style-type:none;
background: url(images/common/navTile.gif) repeat;
width: 100%;
float: left;
}
ul#mainNav li {
float: left;
}
ul#mainNav a {
float: left;
display: block;
padding: 0 1.2em;
line-height: 2.2em;
font: small-caps 1.3em Georgia, "Times New Roman", Times, serif;
color: #dee8ed;
text-decoration: none;
}
ul#mainNav a:hover {
background: url(images/common/navOn.gif) no-repeat 0 0;
color: white;
}
#wrapper {
width: 85%;
margin: 0 auto;
text-align: left;
}