Why is this really simple code not working?

this is in my html

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml”>

<head>

<title> Footbag Freaks </title>
<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8895-1”/>

<link rel=“stylesheet” type=“text/css” href=“styles.css” />

</head>

<body>
<div id=“header”>
<div id=“header-bottom”>

<h3>home of the hack</h3>

<ul>
<li><a href=“”> contact us </a>|</li>
<li><a href=“”> contact us </a>|</li>
<li><a href=“”> contact us </a>|</li>
<li><a href=“”> contact us </a>|</li>

</ul>

&lt;/div&gt;

</div>

</body>
</html>

this is the .css

body {
background-image: url(images/blueMarble.jpg);

}

body {
margin: 10;
padding: 10;
font: small Arial, Helvetica, Vedana, sans-serif;
background-color: #00ffff;
color: #ffa500;
}

#header-bottom{
border-top: 2px solid #b9d2e3;
border-bottom: 2px solid #b9d2e3;
}

#header-bottom ul{
margin: 0;
padding: 0;
}

#header-bottom li{
display: inline;
}

<!–background-repeat: repeat-x;
background-repeat: repeat-y;–>

but i used the same identical code in another page and it puts the list in the header in a line. I even copied and pasted the code. but it doesn’t work on this page. I keep going over & over, it must be really simple but I don’t see it & the href=“styles.css” is in the correct directory.
any suggestions?

Could you be more clear? Are the header links NOT in a line now, but they were in another exercise?

Also, you have a few typos. One thing that always got me when I was starting out was stupid typos.
body {
margin: 10;
padding: 10;
If it’s not 0, you need to use units there for both.

Verdana you have “Vedana”.

The line that should be making the links in a line looks correct:
#header-bottom li{
display: inline;
}

If you set your CSS inline like Kalon did and it suddenly works, you know it’s the path to your external file or possibly a BOM in your external CSS (Byte Order Mark).

your links display correctly inline in my IE8 and FF3.6

 
<head>
<title> Footbag Freaks </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8895-1"/>
<style type="text/css">
body { 
background-image: url(images/blueMarble.jpg);
} 
body { 
margin: 10;
padding: 10;
font: small Arial, Helvetica, Vedana, sans-serif;
background-color: #00ffff;
color: #ffa500;
}
 
#header-bottom{
border-top: 2px solid #b9d2e3;
border-bottom: 2px solid #b9d2e3;
}
#header-bottom ul{
margin: 0;
padding: 0;
}
#header-bottom li{
display: inline;
}
 
</style>
 
</head>
 
<body>
<div id="header">
<div id="header-bottom">
<h3>home of the hack</h3>
<ul>
<li><a href=""> contact us </a>|</li>
<li><a href=""> contact us </a>|</li>
<li><a href=""> contact us </a>|</li>
<li><a href=""> contact us </a>|</li>
 
</ul>
</div>
</div>
</body>
</html>

Thank you all. started all over again and it might be a type. Things are starting to work the more I stick to them.

If you haven’t run into them yet:

jigsaw.w3.org/css-validator/
you can ignore the warnings once you know what they mean, but except for vendor extentions, this will show you all your syntax errors in your CSS (and that’s what most of your typos are, syntax errors).

validator.w3.org for the HMTL. Same thing: when I was going through Ian Lloyd’s book, I had id-“someid” and couldn’t figure out why my styles weren’t working. I never saw the - should have been a =. But the validator did.

Thank you Stomme, I have been trying to use validator. but sometimes it really not helpfull.
somtimes it highlights the second <body> bracket for example of of body or a letter
I just think I am not quite getting yet, but it is getting better :slight_smile:

Ah, the validator speaks its own language and makes cryptic statements until you know what it means.

Please, present them in new threads and say “I’m getting this message from the validator, wtf does it mean???” : )

I learned a lot of rules via the validator instead of directly from reading the specs (which I argue is sometimes even more cryptic than the validator to newbs).