Dee
Dee

Reputation: 255

CSS not showing up

My external style sheet:

body {
margin: 0px;
padding: 0px;
background-color: #4d4d4d; }
 }


#reflection {
background-color: #fff;
background-repeat: no-repeat;
width: 100%;
height: 257px;
 }

#main {
border-top: 20px solid #494949;
margin-left: 0px;
margin-right: 0px;
margin-top: 90px;
height: 330px;
background-color: #eee;
 }

My index page

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title>P.S.</title>
</head>
<body>
 <div id="main">
HERE'S THE MAIN PART!</div>
<div id="reflection">Here's the reflection.</div> </body>

The div "reflection"'s css styling doesn't seem to show up. I haven't a clue as to why. I've been working at it for hours!

Upvotes: 1

Views: 8178

Answers (7)

Mateusz Piątkowski
Mateusz Piątkowski

Reputation: 51

You are missing <link type="text/css" rel="stylesheet" href="path/to/your/stylesheet.css> in the <head>

Upvotes: 0

Mr.T.K
Mr.T.K

Reputation: 2356

here working solution: http://jsfiddle.net/thilakar/yKX4v/1/

Upvotes: 1

anglimasS
anglimasS

Reputation: 1344

body {
margin: 0px;
padding: 0px;
background-color: #4d4d4d; }
 }

Please see above css. 2 time closed. please remove and check it. and also missed <html>

Upvotes: 3

Shebin
Shebin

Reputation: 3468

From http://www.ps.niu-niu.org/ps.css

.reflection {
background-color: #fff;
background-repeat: no-repeat;
width: 100%;
height: 257px;
 }

and from your question

#reflection {
background-color: #fff;
background-repeat: no-repeat;
width: 100%;
height: 257px;
background-image: url('http://www.ps.niu-niu.org/shine.png');
 }

update the server same code as your question

Upvotes: 2

max
max

Reputation: 101811

You are missing a <html> element in your markup as well.

Upvotes: 0

William Niu
William Niu

Reputation: 15853

The css file is malformed.... there is an extra } at the end of body.

body {
margin: 0px;
padding: 0px;
background-color: #4d4d4d; } /* extra bracket HERE */
}

Upvotes: 1

Zomxilla
Zomxilla

Reputation: 467

Your reflection is an id. You're referring to it as a class in the css.

EDIT: This is looking at the live view, by the way. Make sure you have actually applied the changes to your server.

Upvotes: 0

Related Questions