Minimeallolla Posted February 17, 2011 Share Posted February 17, 2011 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? Link to comment https://forums.phpfreaks.com/topic/227957-div-a-set-widthheight-then-auto-once-surpasses-set-width-css-help-please/ Share on other sites More sharing options...
denno020 Posted February 17, 2011 Share Posted February 17, 2011 You could possibly look at min-width and min-height? Denno Link to comment https://forums.phpfreaks.com/topic/227957-div-a-set-widthheight-then-auto-once-surpasses-set-width-css-help-please/#findComment-1175541 Share on other sites More sharing options...
cssfreakie Posted February 17, 2011 Share Posted February 17, 2011 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! Link to comment https://forums.phpfreaks.com/topic/227957-div-a-set-widthheight-then-auto-once-surpasses-set-width-css-help-please/#findComment-1175710 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.