- This topic is empty.
-
AuthorPosts
-
February 21, 2011 at 7:56 am #31705
tjgriffiths1
ParticipantHi All!
I have been writing this really simple code, and i am trying to create a simple nav bar. I have started to use Id’s to link styles to certain elements from my stylesheet (thanks @soap!). However, When loading this page up in firefox, SOME of the styles (background-color) load with the rest of the ‘a’ tags on the page. It does work in other browsers, but i believe it is probably a mistake i am making.
Can anyone help me stop my mistake? Why would the background colour from my list tags continue onto the rest of the page?
Really grateful for all your help guys.
"http://www.w3.org/TR/html4/loose.dtd">
TJ Griffiths TJ Griffiths
Welcome to tjgriffiths.com. In this page you can explore some examples of the work i have been doing over the past couple of years. If you have any queries at all, please feel free to contact me on the address below.
Never Stop Dreaming.
And my CSS
#navbar ul
{
list-style-type: none;
}#navbar li
{
float: left;
display:inline;
margin: 5px;
}#navbar a:link,a:visited
{
font-weight:bold;
color:blue;
background-color:#C0C0C0;
text-align:center;
padding:6px;
text-decoration:none;
text-transform:uppercase;
}#navbar a:hover,a:active
{
background-color:#7A991A;
}body
{background-color:#8ca4ff;
background-image: url('images/header.jpg');
background-repeat:repeat-x;
background-position:left top;
}a
{
font-family: arial, verdana, sans-serif;
font-weight:bold;
}a:link {text-decoration:none;}
a:visited {color:#0000ff; text-decoration:none;}
a:hover {text-decoration:underline;}
a:active {colour:#0000ff; text-decoration:none;}h1
{
font-family: arial, verdana, sans-serif;
text-align:center;
}h2
{font-family: arial, verdana, sans-serif;}p
{font-family: arial, verdana, sans-serif;}February 21, 2011 at 8:15 am #59149asp
ParticipantHi
I got it to work in my Fierfox. But that is the latest version.
Maby if you put
background: none;
on the link tags the problem will be fixed.
February 25, 2011 at 8:02 am #58297tjgriffiths1
Participantthank you so much @wolfcry911! Works perfectly in various browsers.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.