You are currently viewing the BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 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 .
First, let me congratulate Richard York for the great book. I’m trying hard to not buy the other book (that seems more advanced, because the comments) until not finish this satisfactorily.
Seems than nobody have the same problem because I check, at glace, in the forum and nobody asked for the same.
I can’t make IE 7, Mozilla Firefox, or Opera 2 behave like the example in figure 2-9.
The same code, without the Strict XHTML DOCTYPE (quirk mode), behave like figure 2-8 in IE7.
What happened (the output) in standard mode is that the table goes centralized above the div element, and the div elements, in two rows (not by side: div1 width: 30%; and div2 margin-left: 34%; width: auto;), occupied all the windows width one (div1) over the other (div2).
I recheck my code and try different things but can’t make the browsers behave like Figure 2-9. So I will appreciate any help.
The code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Sorry but Iam getting blind. When checked the code again saw extra % signs in the #div2 element. When fixed, the code doesn’t change. Then I see that I forget the closing bracket, }, in the div selector of the CSS. When fixed the browser look like figure 2-9.
Excuse my English. Practice makes the proficiency. I expect improve for the next chapters.
I have another (hopes that better) question.
Mozilla Firefox and Opera interpret the styles differently. Firefox break the Some content, in the table. Some, going above, and content below. Opera, on the contrary, make a lot of padding (for the same 10% for the table and 1% for the divs elements), pushing the borders, and render a very big (in comparison) table.
Who is, more correct, for the standard (W3C) compliant point of view?
I know that I’m only in chapter 2 (now in Chapter 3) But I wish to know (if you think is convenient at this stage), why the differences in Firefox (that split Some content in the table element) and Opera (big table)? Also I want to know if you have ebook of this great book or your other books.