Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 14th, 2006, 02:07 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 11 Exercise - IE6 Margins

Why is the right/left padding or margin for the column 4 box larger in IE6 than it is in IE5.5, Firefox or Safari?

Also the margin along the top and sides are larger than on the other browsers (and the way it is supposed to look from the book p.342.)?

And is there some way to force IE6 to display it the same way?

Here is a link to the code and page:
http://www.madisc.org/CSS%20Studies/exercise11-1.html

Thanks!

Reply With Quote
  #2 (permalink)  
Old January 19th, 2006, 11:48 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is this really that hard of a question? I would have thought this came up before.

Perhaps I need to finish the book, could be in Chapter 18, though it didn't seem to be there.

CSS has made me realize just how far the web has to go. It's like every browser for itself!

Is it just MS making trouble for everyone as per usual? ;)

Reply With Quote
  #3 (permalink)  
Old January 20th, 2006, 09:48 AM
jminatel's Avatar
Wrox Staff
Points: 13,964, Level: 51
Points: 13,964, Level: 51 Points: 13,964, Level: 51 Points: 13,964, Level: 51
Activity: 11%
Activity: 11% Activity: 11% Activity: 11%
 
Join Date: May 2003
Location: Indianapolis, IN, USA.
Posts: 1,836
Thanks: 51
Thanked 105 Times in 81 Posts
Default

Rich, the book author, answers most of the questions in this forum himself. (He's a one-man machine!) I think he may be in the middle of a move this week, and I know he just finished another project for me last weekend so he may be taking just a couple of days off from answering to recharge. I'm sure he'll be back on here soon. :)

Jim Minatel
Senior Acquisitions Editor
Wiley Technology Publishing
WROX Press
Blog: http://wroxblog.typepad.com/
Jim's Book of the week: No book this week - Donate to the Red Cross!
Reply With Quote
  #4 (permalink)  
Old January 20th, 2006, 10:42 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 5 Times in 5 Posts
Default

No, not a tough question. Sorry, I've been neglecting the forums recently. Had lots going on. You know how it is :-).

> Is it just MS making trouble for everyone as per usual?

According to Microsoft, their goal is to comply with the appropriate standards. They've blogged about new standards support and bug fixes that are forthcoming in the new IE7 browser. So my guess is that Microsoft doesn't intentionally make it difficult for web designers, these are just bugs. Of course loads of people put on their tin foil hats and hold the belief that MS did intentionally introduce and maintain differences in Explorer and other browsers so as to keep their stranglehold on the browser market through proprietary lock-in. And then it has been five years since any update to Trident, the rendering engine in Explorer, was released. As far as I'm concerned no one can really know for sure and all of it is just speculation. Personally I'm skeptical of MS, but I try to remain neutral.

> Why is the right/left padding or margin for the column 4 box larger in IE6 than it is in IE5.5, Firefox or Safari?

I've been tinkering with this one for a half hour or so and so far I've been unable to come up with a work-around that works in Explorer without completely changing the example. I remember encountering a similar bug as I was preparing a floating column example for my second book. I remember taking a completely different approach to it.

Typically when Explorer gives you differing output you can inject a style sheet that only Explorer can see, which in theory would look like this for this exercise.

Code:
                div#footer {
                    height: 35px;
                    margin: 5px 0 0 0;
                    clear: both;
                }
            </style>
            <!--[if lt IE 7]>
                <style type='text/css'>
                    div#column4 {
                        margin: 0 330px 0 163px;
                    }
                </style>
            <![endif]-->
        </head>
        <body>
The margins should be given smaller lengths to close the gap. The problem with this is, Explorer is not applying margin to the column4 element, so no values applied to that margin make any difference in the output (which is completely wrong behavior, by the way). The workaround would be to place everything in a container element, float the elements and offset their positions by applying a position: relative; declaration and various offset properties. That approach lets you circumvent the use of margins all together. If you're interested in that approach, I'll post some code (I don't have that code with me right now). Personally, I think that positioning is the way to go for multi-columns, since that approach doesn't have as many bugs as the float approach to butt your head against in Explorer. Here's a link to an example I made for someone a while back in another forum.

http://p2p.wrox.com/topic.asp?TOPIC_ID=29544

Let me know if you have any questions about that one.

Sorry it took so long for me to respond to your question.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
Reply With Quote
  #5 (permalink)  
Old January 23rd, 2006, 12:05 PM
Registered User
 
Join Date: Jan 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! I will try it out.

Reply With Quote
Reply


Thread Tools
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
chapter 11 figure 11-7 relative positioning pelopito BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 2 November 29th, 2007 05:11 AM
Ch 11 Pg459 Exercise 5 C# brivad BOOK: Beginning ASP.NET 1.0 0 September 10th, 2007 08:59 AM
Chapter 3 (Fig 3-23) - Box model margins wilsonc BOOK: Accessible XHTML and CSS Web Sites: Problem Design Solution 0 July 31st, 2006 10:23 PM
Chapter 3 Exercise 3 Matt WAXON BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 July 4th, 2005 02:19 AM



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


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