by michael on Jun 2, 2006 at 10:32:37 am
I've always used tables for layout and css for text elements etc. I'm trying to modernise and learn to use css for layout. i'm prtty clueless about this.
the content for my planned site will be in a rectangular box, say 650 by 300. This should always float in the middle (vertical and horizontal) of the page regardless of the browser window size. How do I position my 650 by 300 container DIV in this way. If I try to use a top:50%; left:50%; value, the top left corner of my container div is alway in the middle of the page. How do I get the center-point of my container div to always be the centre of the page?
a stupid question i know, but it's been bugging me...
Re: CSS Layouts by isotrope on Jun 15, 2006 at 11:58:56 pm
not sure if you got an answer or not somewhere else...
You're on the right track. Now try adding a left margin of minus half your width and a top margin of half your height. In your case, left margin: -325px and top margin: -150px.