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 February 24th, 2005, 05:13 PM
Registered User
 
Join Date: Feb 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Full Page No Scrollbar In IE

In your book it said the following code would not work in Internet Explorer 6.0

<p style="margin:10px; padding:10px; background-color:silver; position:absolute; top:0; left:0; bottom:0; right:0;">blah blah</p>

This will help.

<p style="margin:10px; padding:10px; background-color:silver; position:absolute; top:0; left:0; bottom:0; right:0; width:100%; height:96%;">blah blah</p>

 
Old February 24th, 2005, 05:27 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Sure, if you're working in quirks mode. IE in standards mode uses a completly different box model. You should see that mentioned in the box model diagram in Chapter 10 (admitedly I didn't go into nearly enough detail on that topic). In IE standards mode, width: 100% + 20px margin + 20px padding + 2px border = greater than the width of the window and height: 96% doesn't do anything.

In quirks mode you don't even have to bother with absolute positioning or the four offset properties. IE doesn't stretch content in either rendering mode with all four offset properties present.

The entire book is focused on composing markup in standards mode, since IE6 is more consistent with the other browsers when in standards mode, which facilitates multi-platform development. I didn't get to elaborate much on the differences in box model rendering in IE quirks vs. IE standards mode (eventhough I wanted to) because I was on a tight deadline.

HTH!

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 February 24th, 2005, 05:32 PM
richard.york's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Here's a little code to backup my claim.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
   <html>
        <head>
            <title></title>
            <style type='text/css'>
                p {
                    padding: 10px;
                    margin: 10px;
                    border: 1px solid black;
                    background: lightgrey;
                    position: absolute;
                    top: 0;
                    right: 0;
                    bottom: 0;
                    left: 0;
                    width: 100%;
                    height: 96%;
                }
            </style>
        </head>
        <body>
            <p>
                It is not a bad idea to get in the habit of writing down one's thoughts. It
                saves one having to bother anyone else with them.
                    - Isabel Colegate
            </p>
        </body>
    </html>
You see with the XHTML strict DOCTYPE present, standards mode is invoked and a scrollbar appears on the bottom and height is not affected by the presence of the height: 96% declaration. When it is removed you'll see what you saw in your example.

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
unexplained horizontal scrollbar on every page crmpicco HTML Code Clinic 2 October 8th, 2008 01:50 AM
Scrollbar in Themes. 99mary BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 March 28th, 2007 07:54 PM
SCROLLBAR help! Please! Sickopuppie Dreamweaver (all versions) 0 June 13th, 2006 03:06 AM
scrollbar aytacakin Pro JSP 0 December 29th, 2005 05:33 AM
How do I open a Web page in full screen esilverb Javascript How-To 3 June 24th, 2003 09:46 AM





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