Centering a webpage without the wrapper div
Whether you knew it or not...still, most don't; you can center a webpage by directly styling the body tag.How is this possibleyou ask? Well, the sole purpose of the wrapper div is to give IE5 the support it needs to center correctly; so if you're anything like me (or Microsoft) - you're putting an end to your IE5 development. The following method works pefectly in IE6+, Mozilla/Firefox (all), Opera7+, and Safari(all).
Centering a webpage with CSS
body {
margin:0 auto;
width:760px;
/* adjust width as needed */
}
Voila!
Your page is centered! And yes, it really is that simple.Todays question and book information
The winner of today’s contest will receive a copy of 101 Essential Tips, Tricks, and Hacksfor CSS by Rachel Andrew.Describe a hypothetical tag-team cage match-up between Jeffrey Zeldman and Molly Holzschlag vs Eric Meyer and Rachel AndrewPlease remember to put your answers encapsulated within a <blockquote> element, and the regular discussion as normal. Awaiting some hilarious responses...
recent
- Matador: The Obvious MVC Framework for Node
- Sandboxing JavaScript
- Crouching Ender, hidden command
- Ender.js - The open submodule library
- Qwery - The Tiny Selector Engine
- Klass
- Smallest DOMReady code, ever.
- $script.js - Another JavaScript loader
- About that slowness on Twitter...
- Autocomplete Fuzzy Matching
- JavaScript Cache Provider
- JavaScript Animate
- Asynchronous method queue chaining in JavaScript
- Something changed
- Unofficial Twitter Widget Documentation
i am dustin diaz

