Jump to content

CSS Auto-sizing


gerkintrigg

Recommended Posts

Hello!

I am trying to sweep away my safety blanket by designing PURELY in CSS with php, so no tables AT ALL.

I think I'm doing quite well at the moment but for one problem.

 

My website in development is: http://magic2k.com/cornwall_dvd/index.php and it does most of what I want.

 

I think I get the position: relative / absolute stuff, but I want the main white body to size automatically, but be no smaller than 600 pixels, whichever is the greater. Is there a way of doing this in CSS? (and if so, how?)

 

If I change the style sheet, the white body just vanishes.

 

Please help!

Thanks,

Neil

Link to comment
https://forums.phpfreaks.com/topic/123894-css-auto-sizing/
Share on other sites

that's good, but on: http://magic2k.com/cornwall_dvd/index.php the 2's just slide off the bottom of the white part of the page. I want to automatically make the white part bigger depending on what I output in the main portion of the site.

 

It does it automatically in table layouts, where the table just expands to fit whatever's inside it.

:\

Link to comment
https://forums.phpfreaks.com/topic/123894-css-auto-sizing/#findComment-639677
Share on other sites

  • 2 weeks later...

that's good, but on: http://magic2k.com/cornwall_dvd/index.php the 2's just slide off the bottom of the white part of the page. I want to automatically make the white part bigger depending on what I output in the main portion of the site.

 

It does it automatically in table layouts, where the table just expands to fit whatever's inside it.

:\

 

This is why using position:absolute for a wire-frame layout is BAD!

 

Absolute positioning is outside of the flow of html and has no relation whatsoever to the tags, text and html in the markup ... it is OUTSIDE of the flow ... so of course it will never "auto-adjust".

 

Also, if you ever want to have a "liquid" or "elastic"layout (that completely auto sizes everthing based on monitor window size) you need to get away from fixed sizes and positioning.

 

You need to create a simple 2 column layout ... css layout 101 stuff. Two left floated columns.

 

Start at the place most of us did years ago ... maxdesign.com floatutorial

 

After that, check out all the other links and tutorials there ... listomatic will make navigation a snap.

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/123894-css-auto-sizing/#findComment-648074
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.