PDA

View Full Version : CSS Problem


Viresh Amin
07-28-2004, 04:12 AM
I've been trying to figure out why my CSS code won't work. Can someone figure it out. For some reason the paragraph inside the body won't work. And also the horizontal rule won't show up white.

Thank You

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>
<title>Random</title>
<link rel="stylesheet" type="text/css" href="random1.css">
</head>

<body>
<h1>Random Links</h1>
<p>27/Jul/2004 08:25 PM</p>
<hr>
</body>

</html>
||CSS FILE||


body {background-color: black}
h1
{
color: #105b94;
font-size: 13pt;
background-color: yellow;
letter-spacing: 0.5cm;
border-left: medium solid #ff0000
}
p {margin-left: 20px; font-size: 13pt; color:white}
hr {color: white}

tsguitar2004
07-28-2004, 04:33 AM
It works on my machine (IE6, NS7, Opera7.5 on pc). I see everthing just fine. What I don't understand is why there is a bit of red on the left border of the <h1> text.Duh! I didn't look at the CSS closely enough... Idiot.
http://scweb.esuhsd.org/projects/test/test_072704.html

I just wanted to see if loading it to a server would cause me the troubles you describe, but it's fine. Are you on a mac? Can I get some screen shots?
-ts

I wrapped the whole thing in a div called "wrapper" and gave a border-bottom: 1px to that div. That gets rid of the <hr> and makes sure that the line is white. NS won't color the <hr> in the same way IE does. I put a margin-bottom: 20px to give some space between the <p> and that white line.

Viresh Amin
07-28-2004, 03:00 PM
Ya I figured it out. It worked fine... but it never worked when I checked it and then just saved it and came back to it, and it worked. But thanks anyways. What you have there is fine... its exactly how it looks.

mindlessLemming
07-29-2004, 02:18 AM
If you're testing in IE and the changes don't seem to be happenning, make sure it's set to "Check for new version of page on every visit" under internet options.