Click to See Complete Forum and Search --> : CSS error (?)


KDLA
10-31-2006, 10:27 AM
I keep getting this error:

Line: 7

Parse error - Unrecognized : <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" /> <title>Online Bookstore Links - KYVU</title> <style type="text/css"> html, body {height: 100%;}

What does that mean? Here's the head section of my coding:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1" />
<title>Online Bookstore Links - KYVU</title>
<style type="text/css">
html, body {height: 100%;}
body {margin: 0; padding: 0;}
#top {background: url(http://www.kyvu.org/images/bkgd_hdr.gif); display: block; width: 100%; border-bottom: 20px solid #330066; margin: 0; padding: 0;}
#banner {border-bottom: 1px solid #fff;}
#top img {border: 0; display: block; margin: 0; padding: 0;}
#content {display: block; font-family: arial, sans-serif; margin: 0; font-size: 80%; padding: 30px; border-left: 165px solid #ad99c2; height: 80%;}
#text h1 {color: #330066; background: #fff;}
#text li {line-height: 2em;}
.sep {color: #fff; background: transparent;}
</style>
</head>

WebJoel
10-31-2006, 12:49 PM
The only 'warnings' I received with Line 7 is when tested with level 3 Accessibility:

Access: [6.1.1.2]: style sheets require testing (style element)
(Priority 1)

Line 7 is the beginning of your <style> body {foo:}</style>.

This basically means that a page styled relying upon <STYLE> must be checked so as to display adequately when CSS is turned off. -Must not be reliant upon CSS.
I am not sure entirely what that means... but can you create this page using html 4.01 instead of XHTML? If not, then I'd go to "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" and read if there is any criteria that is causing this 'warnings'.

drhowarddrfine
10-31-2006, 01:11 PM
I don't get any errors either.

KDLA
10-31-2006, 01:15 PM
Must be because I cut and pasted the coding into the validator.... that's all I can think of, unless it was a cache problem with my browser.... well, as long as it passes muster, I'm not going to worry about it!
Thanks for taking a look -
KDLA

WebJoel
10-31-2006, 02:20 PM
I think that it is an Accessibility warning. It will not show up unless you set your validator level to priority 1, 2 or 3. In "none" and "normal" mode, there are no warnings.

_Aerospace_Eng_
10-31-2006, 04:16 PM
Hmm seems like it might having an issue with the spacing
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

NogDog
10-31-2006, 05:04 PM
If you're talking about the CSS validator, if you paste code into the "Validate by direct input" section, it only wants CSS text, not the entire HTML document.

KDLA
11-01-2006, 07:43 AM
Yeah -- that's it, NogDog. I cut and pasted in the HTML validator, then CSS, not thinking about the incompatibility. :rolleyes: