0

Hi everyone

I was using this CSS template for my site but when I tried to add a background to the navbar the picture only appeared in between the links not behind them. I have tried removing the hover and a:link and a: visited but it doesnt make any difference. Can someone help me out please I tried placing the code where the comment is

body {color: #000; background-color: #FFF}
body, p {font: 11px/14px verdana, geneva, arial, helvetica, sans-serif}

h1 {font: 24px "trebuchet ms", verdana, arial, helvetica, geneva, sans-serif}
h2 {font: 20px "trebuchet ms", verdana, arial, helvetica, geneva, sans-serif}
h4 {font: 18px geneva, sans-serif; margin: 0; color: #000; background-color: #FFF}
a {text-decoration: none}

div#navbar {width: 130px; float: left}
div#navbar a {display:block; margin: 0}
div#navbar a:link, a:visited  {color: #000}
div#navbar a:hover {color: #FFF; background-color: #008000}
*/ I tried placing the code here */


div#main {width: 80%; float:right}

#signature{font: 17px "Bradley Hand ITC"}

div#footer {border-color: gray; border-width: 2px 0px 0px 0px; border-style: solid; color: gray; padding: 6px 0px 10px 0px; display: block; float: none; clear: both; margin: 20px 0px 0px 0px}

li {margin-bottom: 10px}

Many Thanks
HLA91

2
Contributors
1
Reply
2
Views
10 Years
Discussion Span
Last Post by MidiMagic
0

I need to see your html.

Try the following:

1. You must define the background image in the stylesheet, not in the html, if you have styles applied to the navbar. Otherwise, ALL of the "navbar" styles you have will trump your image in importance.

2. What kind of object contains the navbar? Certain objects are not transparent to images.

3. Your change of the background color on hover might not be reversible to display an image again. There is no transparent attribute for background.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.