Results 1 to 6 of 6
Thread: Adjustable height using CSS?
-
09-06-2008, 12:44 PM #1Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
Adjustable height using CSS?
Hello, I have a friend helping me with a CSS design but it takes him about a week to make one simple change so I would like to fix this one thing myself. I once asked him now to make a div height variable so the more text/data is in the area it automatically moves the other divs around it to the next line. He fixed it but I do not want to bother him again so I would like to know how to do this. Could you please give me a working example of code so that if there are added rows it would push the div content below it to the next line instead of overlapping each other. I can set a manual height: 150px and it works but if there is no text on that section it just displays a big empty space which is why I want a variable height. I tried searching all over google and cannot find that. Thanks
Last edited by lexington; 09-06-2008 at 12:52 PM.
-
09-06-2008, 12:56 PM #2Web Hosting Master
- Join Date
- Jan 2008
- Location
- St. John's, NL
- Posts
- 2,201
Usually height:auto will take care of this. Take a look at a site I put together recently, premiumdjs dot com, and see how it is done there. Hope it helps
Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
LCWSoft - Canada web hosting (based in Newfoundland) since 2007
Servers based in the US and Canada (Uptime Report)
-
09-06-2008, 12:59 PM #3Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
Yeah I tried that before creating this topic but it didn't work.
-
09-06-2008, 01:22 PM #4Web Hosting Master
- Join Date
- Jan 2008
- Location
- St. John's, NL
- Posts
- 2,201
Did you try using position: on your divs?
Cpanel/WHM • PHP • Perl • Ruby • Full Time Support
LCWSoft - Canada web hosting (based in Newfoundland) since 2007
Servers based in the US and Canada (Uptime Report)
-
09-06-2008, 01:34 PM #5Web Hosting Master
- Join Date
- Aug 2005
- Posts
- 3,587
just remove the height, there's no need to add it, unless you want a specific height. Adjustable height is actually the default setting. If it doesn't work, there's other CSS probably interfering. Do you have a live example?
-
09-06-2008, 01:39 PM #6Disabled
- Join Date
- Dec 2003
- Posts
- 1,941
Thanks for the help guys but I just used php to detect how many characters are on the page and to insert the height div based on the results and that does the trick for now.