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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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