You are creating a 760px width for both html and body, which means that
there is no where else for it to get larger.

Try this

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
        <title></title>
        <style type="text/css">
        <!--
         html {
   width: 100%;
   height: 100%;
   border: thin solid black; /* take out after you look at it */
   margin: 0;
   padding: 0;
}

body{
   width: 760px;
         margin: 0 auto;
        height: 100%;  /* Just so you can see the height */
   border: thin solid blue /* again take out after you look at it */
}
        -->
        </style>
</head>

<body>

</body>
</html>


Sandra Clark
==============================
http://www.shayna.com
Training in Cascading Style Sheets and Accessibility


-----Original Message-----
From: Matt Quackenbush [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 11, 2006 2:56 PM
To: CF-Talk
Subject: Re: CSS Horizontal Centering in IE7

Sandra,

I have the width in there; was just posting minimal code since I know how
much I hate to wade thru a bunch of superflous code.  Here is the actual CSS
rule as written:

html, body {
    margin: 0 auto;
    text-align: center;
    width: 760px;
    min-width: 760px;
}


Thanks,

Matt


On 12/11/06, Sandra Clark <[EMAIL PROTECTED]> wrote:
>
> You need a width in there.
>
> Another CSS Rule
>
> Everything needs to be 100% of the parent, in any case where stuff 
> isn't defined, CSS will always make margin-right large enough to 
> accommodate 100% of the parent.  In this case the parent is html.
> If using auto, then whatever the difference is will be split between 
> margin left and margin right. Providing that is, that width is 
> declared.
>
> body{
>   width: 80%;
>   margin: 0 auto;
> }
> Also equivalent
>
> body{
> width: 80%;
> margin: 0 10%;
> }
>
>
> Sandra Clark
> ==============================
> http://www.shayna.com
> Training in Cascading Style Sheets and Accessibility
>




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263591
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to