PapaGeek
07-29-2012, 04:39 PM
Andrew S. Tanenbaum, Computer Networks, 2nd ed., Oct 25, 1999, p. 254
“The nice thing about standards is that you have so many to choose from.”
I’m trying to modify my table design layouts to use pure CSS positioning. I have most of it working, but one of the basic concepts does not seem to work on ALL browsers. That is the ability to create a division that automatically centers the entire page in the width of the browser page.
I don’t want to use an odd DOCTYPE to allow stupid quirks to take place, but might not allow other newer features. I want to use a standard doctype.
I’m using the following CSS coding:
body { margin:0;padding:0; background-color: #E4C6AA;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center;
background-image: url(781bg.jpg); }
.framework {width: 781px;
margin: 0 auto 0 auto;
clear: both;
}
And I’m including the entire page inside DIV class=”framework”, /DIV tags
Not surprising, it works on FF, but not IE8!
I’ve tried to include an “align: center;” line in the .framework definition, but no luck.
The only code I can get to work on EVERY browser is:
<body>
<!--framework--><table class="framework" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
Key the entire page here, using CSS for positioning inside the table.
</td>
</tr>
</table><!--end framework-->
<!--#extract end -->
</body>
</html>
.framework {width: 781px;}
Is there a consistent way to get rid of this table? Something that will always work on all browsers, old and new!
“The nice thing about standards is that you have so many to choose from.”
I’m trying to modify my table design layouts to use pure CSS positioning. I have most of it working, but one of the basic concepts does not seem to work on ALL browsers. That is the ability to create a division that automatically centers the entire page in the width of the browser page.
I don’t want to use an odd DOCTYPE to allow stupid quirks to take place, but might not allow other newer features. I want to use a standard doctype.
I’m using the following CSS coding:
body { margin:0;padding:0; background-color: #E4C6AA;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: top center;
background-image: url(781bg.jpg); }
.framework {width: 781px;
margin: 0 auto 0 auto;
clear: both;
}
And I’m including the entire page inside DIV class=”framework”, /DIV tags
Not surprising, it works on FF, but not IE8!
I’ve tried to include an “align: center;” line in the .framework definition, but no luck.
The only code I can get to work on EVERY browser is:
<body>
<!--framework--><table class="framework" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
Key the entire page here, using CSS for positioning inside the table.
</td>
</tr>
</table><!--end framework-->
<!--#extract end -->
</body>
</html>
.framework {width: 781px;}
Is there a consistent way to get rid of this table? Something that will always work on all browsers, old and new!