FORUMS: list search recent posts

CSS Layouts

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
michael
CSS Layouts
on Jun 2, 2006 at 10:32:37 am

Hi there,

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...

Thanks very much for the help.

michael


Return to posts index

isotrope
Re: CSS Layouts
on Jun 15, 2006 at 11:58:56 pm

Hi Michael,
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.

Also, check out... http://www.wpdfd.com/editorial/thebox/deadcentre2.html
good luck,
iso



Return to posts index

michael
Re: CSS Layouts
on Jun 29, 2006 at 9:03:40 pm

this is exactly what i was looking for,

thanks very much,

michael


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]