Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3
This is the forum to discuss the Wrox book Beginning CSS: Cascading Style Sheets for Web Design by Richard York; ISBN: 9780764576423
Welcome to the p2p.wrox.com Forums.

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 .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2005, 02:25 AM
Registered User
Join Date: Nov 2004
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Figure 4-7 on p. 64

Why does this example render differently in IE6 than in Firefox? (The boxes are centered in IE6, left-aligned in Firefox.) I thought that standards mode meant that they would render the same.

  #2 (permalink)  
Old March 27th, 2005, 09:19 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

In an ideal world everything would render identically in all browsers. Here you are seeing a very old bug in Internet Explorer. Well, most developers consider it a bug, but in reality it is a feature that Microsoft developers decided on long ago. That feature is that using the text-align: center; declaration will center all text and block elements that appear as children in the containing block (in this case the containing block is the <body> element). OK, so big deal that's what's it's supposed to do, right? Wrong. According to the standards only text is supposed to be centered with the text-align property. IE also centers block elements like <div>, <form>, <h1>, etc, eventhough that isn't what the standards say to do (it is after all the text-align property). That's why Firefox, et al don't center the <div> elements in that example. For block elements you'll see how alignment of blocks is controlled in Chapter 10 with the margin property.

But you are correct in your understanding of standards mode, it is supposed to make things render more consistently with other browsers (and it helps loads), but there are still bugs to fight with in IE in standards mode (oh how there are bugs!).


Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
install sql server 2005 64-bit khautinh SQL Server 2005 0 November 19th, 2008 01:43 PM
base 64 data in transform golddog XSLT 4 September 14th, 2007 08:39 AM
64 bit p0120144 BOOK: Professional Assembly Language 1 December 26th, 2006 10:04 PM
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM

All times are GMT -4. The time now is 09:36 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.