Calling H1 -what am i doing wrong

liunx

Guest
My website won't render the first part of the .css file.

File should read:

<STYLE TYPE="text/css">

H1
{
FONT-FAMILY: Arial;
FONT-SIZE: 104px;
TEXT-ALIGN: center;
TEXT-DECORATION:underline;
MARGIN-TOP:1px;
MARGIN-LEFT:1px;
MARGIN-RIGHT:1px;
MARGIN-BOTTOM:1px;
}

H2
{
FONT-FAMILY: Arial;
COLOR: #999999;
FONT-SIZE:18px;
MARGIN-TOP:1px;
MARGIN-LEFT:200px;
MARGIN-RIGHT:200px;
MARGIN-BOTTOM:1px;
TEXT-ALIGN: justify
}

But then H1 appears as the standard H1 would, not as I have it.

File has to read to work:

<STYLE TYPE="text/css">

{}

H1
{
FONT-FAMILY: Arial;
FONT-SIZE: 104px;
TEXT-ALIGN: center;
TEXT-DECORATION:underline;
MARGIN-TOP:1px;
MARGIN-LEFT:1px;
MARGIN-RIGHT:1px;
MARGIN-BOTTOM:1px;
}

H2
{
FONT-FAMILY: Arial;
COLOR: #999999;
FONT-SIZE:18px;
MARGIN-TOP:1px;
MARGIN-LEFT:200px;
MARGIN-RIGHT:200px;
MARGIN-BOTTOM:1px;
TEXT-ALIGN: justify
}

But, obviously this isn't correct .css coding. What am I doing wrong?you need:
.h1 {
css stuff
}CSS can't be expected to work properly without valid HTML so first check your page with The Validator (<!-- m --><a class="postlink" href="http://validator.w3.org/">http://validator.w3.org/</a><!-- m -->). Once you've corrected all of your mark up errors you can run your page through The CSS Validator (<!-- m --><a class="postlink" href="http://jigsaw.w3.org/css-validator/">http://jigsaw.w3.org/css-validator/</a><!-- m -->). If you satill have trouble after that then post a URL.Get rid of this part in the css file...
<STYLE TYPE="text/css">
Then it should work correctlyThanks Josh

working perfectly now.also, just to make sure, remove the </style> at the end of your document. That stuff is used only if you have the css information on the page so it is internal.
 
Back
Top