You are currently viewing the BOOK Beginning CSS: Cascading Style Sheets for Web Design, 2nd Ed; ISBN: 978-0-470-09697-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
I've gone through Ch 8 and I'm wondering why the XHTML doesn't validate? I've check my input to the book and have copied/pasted the code provided. Did I miss something? Sorry, I should be a little more specific. (8-1b, 8-3b, Ex. 8-1, the files that seem to start with the <img> tag???).
This is a great book regardless. You might want to work on those color screen shots thought.
Thanks, in the writing process where the code is edited and re-edited and copied and pasted and pasted and copied over and over again, sometimes no matter how much we may try to avoid them, there will be errors in the code.
And, I didn't run every single example through the W3C's validation service.
Just visually glancing at the content, it seems alright to me, what was the validation error?
Sorry for the late reply. Don't get me wrong, the actual page displays properly in the browsers so, I just continued with the rest of the exercises and finished the book. Again, it really is a good book.
Here is the error message for both images, that I received when I validated the XHTML. (line 12 and line 13 are on my computer, and this is from your code only)
# Line 12, Column 51: document type does not allow element "img" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "address", "fieldset", "ins", "del" start-tag.
<img src='sun.png' alt='people' id='left' />
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "").