![]() |
push centered div to top of page?
Here is what I have so far:
http://queirdo.com/index2.htm I just want to center the #content div and have it at the top of the page. I can center it with margin:0, but then on every browser tested (except IE of course because it always does it's own thing) there is a gap between the div and the top of the page. If I try to absolute position it to top:0px it will no longer be centered. How can I fix this? (Why I am using this layout: I have background images that I want to extend on both sides on larger resolutions, but they won't fit on the page with content on 800X600 resolution, so I just want them to disappear when the window is that small. They need to match up exactly with an image I will put in the #content div, so I need it to be in the same place on every browser. I've tried a bunch of other ways to accomplish what I want, but nothing has worked so I'm trying 2 divs underneath the main content to put my background images in, extending from the center.) |
Hello queirdo,
Try changing Code:
html, body {Code:
* { |
Yes, that works. It turned out it was the margin or padding on the paragraph inside the div that was shifting things down. Thanks!
|
| All times are GMT +1. The time now is 11:17 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.