Jump to content

DIV; a set width/height then auto once surpasses set width? css help please.


Minimeallolla

Recommended Posts

Is there such a way that you could give a div a set width or height and then when that set width or height is reached make it auto from there.. \=

 

eg

#myepicdiv

{

width:250px;

width:auto;

height:250px;

height:auto;

}

 

When content surpasses 250pixels it then self sets the width/height to auto.

 

Is that possible?

probbaly the only one you need is min-height: since most websites grow only vertical.

 

so you can for instance do:

 

  div#wrapper{
       width:960px;
       min-height:550px; /*make a special stylesheet for IE 6 where are min-width's and min-heights are set to height
       margin: 0 auto; /*center the div */
       border: 1px dotted #ccc; /*just to show where it is */
}

 

good luck!

 

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.