I'm trying to be XHTML-compliant by using CSS to format text and insert background images in my page, which is all within tables.
I have a coloured bar at the bottom which a) has a background graphic and b) has text links which are a different size and colour to those in the main body of the page.
The problem I'm having is that even though I've defined both "regular" links and a class for the ones in the coloured bar the ones in the bar are not behaving. I can get the background graphic to appear and the links to be the right size/colour, but they've each got a white background!
Here's my style sheet (it's the .bottomnav links that aren't looking right):
body {
margin: 0px 0px 0px 0px;
padding: 0px;
overflow: auto;
}
.leftbackground {
background-image: url(images/left_nav_bar.gif);
}
.rightbackground {
background-image: url(images/blue_bar_right.gif);
}
p {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
}
a:link {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #FF6633;
text-decoration: none;
}
a:visited {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #FF6633;
text-decoration: none;
}
a:hover {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #3366FF;
text-decoration: underline;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #FF6633;
}
.bottomnav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
background: url(images/bottom_blue_bar.gif) repeat;
(not sure if I need the repeat or not - I didn't put it in for .leftbackground etc but that renders OK)
}
a.bottomnav:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
text-decoration: none;
background: url(images/bottom_blue_bar.gif) repeat;
}
a.bottomnav:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
text-decoration: none;
background: url(images/bottom_blue_bar.gif) repeat;
}
a.bottomnav:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FF6633;
text-decoration: underline;
background: url(images/bottom_blue_bar.gif) repeat;
}
ul {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
This is what the code looks like for the bottomnav links:
<td valign="bottom" class="bottomnav"><div align="center"><a href="../index.asp" class="bottomnav">Home</a>
Either the background graphic wouldn't show or the links would become the "normal" link colour/size if I took either of the class="bottomnav" bits out.
Funnily enough, I just checked my page in Opera and everything works fine, but it doesn't in IE6!
Any ideas, anyone?!
I have a coloured bar at the bottom which a) has a background graphic and b) has text links which are a different size and colour to those in the main body of the page.
The problem I'm having is that even though I've defined both "regular" links and a class for the ones in the coloured bar the ones in the bar are not behaving. I can get the background graphic to appear and the links to be the right size/colour, but they've each got a white background!
Here's my style sheet (it's the .bottomnav links that aren't looking right):
body {
margin: 0px 0px 0px 0px;
padding: 0px;
overflow: auto;
}
.leftbackground {
background-image: url(images/left_nav_bar.gif);
}
.rightbackground {
background-image: url(images/blue_bar_right.gif);
}
p {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
}
a:link {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #FF6633;
text-decoration: none;
}
a:visited {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #FF6633;
text-decoration: none;
}
a:hover {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
color: #3366FF;
text-decoration: underline;
}
h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
color: #FF6633;
}
.bottomnav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
background: url(images/bottom_blue_bar.gif) repeat;
(not sure if I need the repeat or not - I didn't put it in for .leftbackground etc but that renders OK)
}
a.bottomnav:link {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
text-decoration: none;
background: url(images/bottom_blue_bar.gif) repeat;
}
a.bottomnav:visited {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFCC33;
text-decoration: none;
background: url(images/bottom_blue_bar.gif) repeat;
}
a.bottomnav:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FF6633;
text-decoration: underline;
background: url(images/bottom_blue_bar.gif) repeat;
}
ul {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
This is what the code looks like for the bottomnav links:
<td valign="bottom" class="bottomnav"><div align="center"><a href="../index.asp" class="bottomnav">Home</a>
Either the background graphic wouldn't show or the links would become the "normal" link colour/size if I took either of the class="bottomnav" bits out.
Funnily enough, I just checked my page in Opera and everything works fine, but it doesn't in IE6!
Any ideas, anyone?!