I want my content box class to expand to the amount of text it has in it on different pages so I don't have to make a new div id for every page. How would I make it do that? #content { margin: auto; background-color: #FFF; border-radius:5px; position: relative; width: 1000px; height: 525px; padding: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.4); } Code (markup):
Do you mean "expand" the height? Pretty simple - remove the "height" and replace it with "min-height". With min-height, you have a guaranteed minimum height. If the text is "higher" than that, the div will expand.
yes GMF is right... It will be easy for you if you keep "min-height" at given px it will remain at that px and it will increases as the length of the text increases
#content { margin: auto; background-color: #FFF; border-radius:5px; position: relative; width: 980px; padding: 10px; box-shadow: 0 0 20px rgba(0,0,0,0.4); } Code (markup): I've modfied the width of the container ( to be exactly 1000px wide ). But it's 980px, how's that possible ? Well, when you add paddings to an element and you have a specified width it simply adds ( width and height ).The 'secret' is to substract the padding that goes on the sides ( padding-right & padding-left ).So 10px padding left + 10px padding right subtracted from 1000px = 980px.
Sweet thanks again and I figured out the other problem it was supposed to be set to "all" in order for it to minimize with the same speed.