MrMJS
08-14-2008, 08:48 AM
I am using background image on my rollovers, but I am unsure how to control different widths for each link on rollover. as you can see from test page the hover backgrounds not looking right.
here is test link --> http://mrmjs.com/help/index.html
here is test code...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="verify-v1" content="gwnPOyDAuHXQBI6dQ6Jy7ijsYXkfbzPBcXs3wOkxIU8=" />
<title>test</title>
<style type="text/css">
<!--
body {
background-color: #333333;
}
#wrapper {
width: 780px;
margin-right: auto;
margin-left: auto;
}
#header {
height: 300px;
background-color: #FFFFFF;
background-image: url(menu-bg.jpg);
background-repeat: no-repeat;
}
#menu {
height: 44px;
width: 315px;
margin-left: 468px;
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#menu ul {
list-style-type: none;
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
#menu li {
display: inline;
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
#menu a:link, a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
text-decoration: none;
font-weight: bold;
line-height: 44px;
padding-top: 15px;
padding-right: 8px;
padding-bottom: 15px;
padding-left: 8px;
margin: 0px;
}
#menu a:hover {
color: #FFFFFF;
font-weight: bold;
line-height: 44px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-image: url(menu-rollover.jpg);
background-repeat: repeat-x;
}
.breadcrumb {
font-weight: bold;
color: #F8EB3A;
margin-left: 8px;
margin-right: 8px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 44px;
margin-top: 15px;
margin-bottom: 15px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="menu">
<ul>
<li class="breadcrumb">Home</li>
<li><a href="#">Other--Link</a></li>
<li><a href="#">Link #3</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>
here is test link --> http://mrmjs.com/help/index.html
here is test code...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="verify-v1" content="gwnPOyDAuHXQBI6dQ6Jy7ijsYXkfbzPBcXs3wOkxIU8=" />
<title>test</title>
<style type="text/css">
<!--
body {
background-color: #333333;
}
#wrapper {
width: 780px;
margin-right: auto;
margin-left: auto;
}
#header {
height: 300px;
background-color: #FFFFFF;
background-image: url(menu-bg.jpg);
background-repeat: no-repeat;
}
#menu {
height: 44px;
width: 315px;
margin-left: 468px;
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#menu ul {
list-style-type: none;
padding: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
}
#menu li {
display: inline;
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
#menu a:link, a:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
text-decoration: none;
font-weight: bold;
line-height: 44px;
padding-top: 15px;
padding-right: 8px;
padding-bottom: 15px;
padding-left: 8px;
margin: 0px;
}
#menu a:hover {
color: #FFFFFF;
font-weight: bold;
line-height: 44px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-image: url(menu-rollover.jpg);
background-repeat: repeat-x;
}
.breadcrumb {
font-weight: bold;
color: #F8EB3A;
margin-left: 8px;
margin-right: 8px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 44px;
margin-top: 15px;
margin-bottom: 15px;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<div id="menu">
<ul>
<li class="breadcrumb">Home</li>
<li><a href="#">Other--Link</a></li>
<li><a href="#">Link #3</a></li>
<li><a href="#">Contact Us</a></li>
</ul>
</div>
</div>
</div>
</body>
</html>