• OFF TOPIC fun forum - NO politics - NO religion - NO jerks. It's not complicated. Thanks!

CSS Help

Status
Not open for further replies.

devino246

Official DIYGK Chem Nerd
Messages
3,856
Reaction score
0
Location
Lynchburg, VA
If anyone here knows any CSS, I could use a tad bit of help. Im in the middle of creating a new website and need to figure out how to use an external style sheet to add a navigation bar. I can get it to work if I use an inline style sheet but...

I have a feeling its the html thats making it not work. It would be nice if I could change the nav bar across the whole site by editing one page.

Heres what I've got to work with:

<link rel="stylesheet" type="text/css" href="layout.css" />
<html>
<head>
<style type="text/css">
ul
{
list-style-type:none;
margin:10;
padding:10;
overflow:hidden;
}
li
{
float:left;
}
a:link,a:visited
{
display:block;
width:120px;
font-weight:bold;
color:#FFFFFF;
background-color:#FF0000;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#B80000;
}

</style>
</head>

<body>
<ul>
<li><a href="/index.html">Home</a></li>
<li><a href="/about.html">About Us</a></li>
<li><a href="/gallery.html">Gallery</a></li>
<li><a href="/contact.html">Contact Us</a></li>
</ul>
</body>
</html>
 
Status
Not open for further replies.
Top