FORUMS: list search recent posts

CSS Parse Error during validation

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
mark2741
CSS Parse Error during validation
on Sep 9, 2007 at 11:51:26 pm

I'm new to css but so far think it's much better than tables. I'm working on a relatively simple page that seems to work fine so far (though I'm not happy with the design itself). I ran it through the w3c validator and get a "parse error" at line 22 of the html file and can't figure out what the problem is.

The offending line, according to the validator, is line 22 of the html file:

(note - I took the div and br brackets out so it would show properly in the post):

div class="contact" id="contactTextDiv" style="contact">P.O. Box 90 br
Pennington, CA 08534 br
132.530.1777 br
132.530.9134 (fax) br
/div

Here is a link to the validation page:
link

Any suggestions/help is appreciated. Also, if anyone can give me some design advice/suggestions to make this thing look better that would be appreciated too! The logo I'm working with is horrible to my eyes (not my fault!) but it is what it is and the client likes it...

If it helps, here is a copy of my style.css file used for this page:

@charset "utf-8";

#mainDiv {
width: 80%;
height: 60%;
margin: inherit;
position: relative;
top: 2px;
width:913px;
height:572px;
z-index:1;
visibility: visible;
background-color: #AE0100;
padding: 0px;
overflow: visible;
border: solid;
border-width: medium;
border: #C8AF9A;
}


#navDiv {
position:absolute;
cursor: pointer;
left:0px;
top:3px;
width:126px;
height:397px;
z-index:3;
background-color: #AE0100;
visibility: visible;
}

#logoDiv {
position:absolute;
left:1px;
top:402px;
width:327px;
height:174px;
z-index:10;
visibility: visible;
}
#contentDiv {
position:absolute;
padding: 2px;
left:126px;
top:2px;
width:780px;
height:474px;
z-index:4;
background-color: #C8AF9A;
visibility: visible;
}
#contactTextDiv {
position:absolute;
left:743px;
top:491px;
width:170px;
height:76px;
z-index:5;
visibility: visible;
background-color: #AE0100;
}

.contact {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
line-height: normal;
font-weight: normal;
font-variant: normal;
color: #FFFFFF;
}

.nav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10pt;
font-style: normal;
color: #FFFFFF;
text-align:center;
padding-top:5px;
}

#linkDiv {
font-family: Arial, Helvetica, sans-serif;
font-size: 12pt;
font-weight: normal;
color: #FFFFFF;
text-align: center;
font-style: normal;
padding-top: 5px;
padding-bottom: 5px;
}

#linkDiv:hover {
cursor: pointer;
font-weight: normal;
text-decoration: none;
background-color: #C8AF9A;
background-image: url(images/navBlock.png);
}

A {
text-decoration: none;
color: #FFFFFF;
}

A:hover {
text-decoration: none;
color: #AE0100;
}



Return to posts index

cowcowcowcowcow
Abraham
Re: CSS Parse Error during validation
on Sep 10, 2007 at 3:00:38 am

Looks like the problem is the style="contact" tag. the style="" tag is suppose to be calling some sort of style tag like setting the font type or background or padding like you would in css. If you're trying to call the name of a style set in the css you need to use either class="" for a style for a group of elements or id="" for a style assigned for one element.

Proper use of the style="" tag would be style="font-size: 12pt;" or style="border: 1px solid #000000;"

Using this tag improperly like this shouldn't make the page look wrong in any browsers though.



Abraham


Return to posts index

mark2741
Re: CSS Parse Error during validation
on Sep 11, 2007 at 1:54:05 am

Thanks! That did the trick!

Now I need to work on validating my xhtml : ) Lots of errors there!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]