Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 14th, 2006, 03:07 PM
Registered User
 
Join Date: Jan 2006
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!

 
Old January 20th, 2006, 12:48 AM
Registered User
 
Join Date: Jan 2006
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? ;)

 
Old January 20th, 2006, 10:48 AM
jminatel's Avatar
Wrox Staff
Points: 18,059, Level: 58
Points: 18,059, Level: 58 Points: 18,059, Level: 58 Points: 18,059, Level: 58
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2003
Posts: 1,906
Thanks: 62
Thanked 139 Times in 101 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!
 
Old January 20th, 2006, 11:42 AM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 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
 
Old January 23rd, 2006, 01:05 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! I will try it out.






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 06: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





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