PDA

View Full Version : CSS Style: One works, the other doesn't



WindInFace
Jan 30th, 2010, 12:36 AM
Hi,

I can't figure this out. mainx works, mainy does not and just uses defaults.

However mainy is a copy/paste of mainx.

[CODE]
<link rel="stylesheet" href="css/OR-KidsWorkerRoster.css" type="text/css">

<body class="mainx">

.mainx {
text-align:center;
background-color:#d0e4fe;
color: black;
padding: 0;
margin: 0";
class="tundra";
}
.mainy {
text-align:center;
background-color:#d0e4fe;
color: black;
padding: 0;
margin: 0";
class="tundra";
}
[CODE]

Thank you in advance for your help!

Excavator
Jan 30th, 2010, 12:54 AM
Hello WindInFace,
Your CSS is invalid. The class="tundra"; does not belong there.
See the links about validation in my sig below.

WindInFace
Jan 30th, 2010, 01:10 AM
Hi Excavator,

I notice the problem when I was working with your reply.

class="tundra"; is ok.

The problem was margin: 0";
Everything after the quote was ignored.
Thank you for your reply!

I tried your validation link but it can't find localhost.

_Aerospace_Eng_
Jan 30th, 2010, 01:26 AM
Hi Excavator,

I notice the problem when I was working with your reply.

class="tundra"; is ok.

The problem was margin: 0";
Everything after the quote was ignored.
Thank you for your reply!

I tried your validation link but it can't find localhost.
You can't give it a localhost url. Just upload your CSS and it will find your errors.

Excavator
Jan 30th, 2010, 01:30 AM
class="tundra"; is ok.

No, that does not belong in your CSS. It is invalid.

The errant " would be found by the validator as well.

I tried your validation link but it can't find localhost.
It can't find it because it's not supposed to - goto CSS (http://jigsaw.w3.org/css-validator/) or Markup (http://validator.w3.org/) and click on the By Direct Input tab, you can copy/paste your code to be checked there.

WindInFace
Jan 30th, 2010, 01:34 AM
Uploads and validatates.

That's awesome!