Forum Moderators: not2easy

Message Too Old, No Replies

possible to center page with positioning?

         

serious

12:19 am on Aug 17, 2004 (gmt 0)

10+ Year Member



I am new to css and am wondering if its possible to still center a page using positioning somehow, and have it display properly in all resolutions. Like now if I used tables I would just make a 700pixel wide table and center it and make the design in there, and it would adjust properly to all the different resolutions.

Everything I have read about absolute positioning in css has made it seem like I will have to keep the site on the left side of the page if i want to use it.

I hope my question is clear enough and I appreciate all responses.

Old_Honky

2:05 pm on Aug 17, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



Put all of your body html inside one container div, then put that inside another (outer) container div, then for the outer container div set margin-left:auto; and margin-right:auto; the inner container div may need to be position:relative; but I'm not sure about that.

photon

8:18 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Take a look at Dead Centre [wpdfd.com] for another method.

Webwork

8:25 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Relevant question and please make reference to authority (besides your own, if possible and no offense intended):

With tables, wasn't it the case that putting everything inside a single table created delay in on screen rendering since browsers would wait until all the sub-tables and cells were sorted out inside the main container table before displaying 'the page'?

Why isn't this true with divs? Won't the browser first sort out all the positioning inside the main container div before rendering the page?

I know this - if true - is a decreasing concern as more people move to high speed connections, but isn't it still a design concern?

vkaryl

1:35 am on Aug 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Webwork: I think it is still a concern; but overall as far as my own experience allows me to state categorically, css renders multiplicities faster than does html made up of table, table header, table row, table data tags.

I think it's not as much a case of "lesser multiplicities" as it is of "lesser load time". Css seems (to me at any rate) to load faster and cleaner than does "tablature html"....

Case in point: zengarden loads almost instantaneously for me, on dial up. A very SIMPLE tabled site with no more information on the first page, and no more graphics (numbering less in fact.... and smaller in size....) takes about 10 times as long (I need to check this at work on the T-1 before I leave I guess, because dial up will be my only benchmark after the 26th).

It was zengarden which convinced me to do my best to utilize css. Of course some of the stylesheets aren't my cuppa. But y'know what? My cuppa IS the ability to load that fast, and display that well....

[ACK. OT again.... SORRY!]