Click to See Complete Forum and Search --> : how to make container div expand when info div(s)'s made visible


s0nofr4g3
04-23-2007, 02:38 AM
the new design for my site, spareinkmedia.com is almost done, but for some reason i cant get one thing... i made it so that there are client names on the left, and a div to the right where the info on them will display when clicked. thats all well and good. the problem is, when you open a few of them, the divs expand beyond the page, so you must scroll, and it looks sloppy since the container div 'main' doesnt expand to accomodate...the info just goes right over it.

I put in DONT OPEN MORE THAN ONE, but people are ignorant and wont read that, and then will open as many as they wish anyway even if they do. plus, it doesn't look very professional to have a warning telling them there's something wrong with the page... that doesn't instill trust in thinking they'll get good service from us, y'know?

i've validated and can't find the prob.... here's a link to the page:

http://www.spareinkmedia.com/newlayoutwithproblems/portfolio.htm

anyone have ANY idea how to remedy this? or am I just too tired to think right now?

thanks all.

jogol
04-23-2007, 05:23 AM
why not use a proper script that closes the div when another one is clicked? look into moo.fx (http://moofx.mad4milk.net/) or scriptalicious (http://script.aculo.us/).

Centauri
04-23-2007, 06:11 AM
You need to clear the floats to get the container to "contain" them #main {
border:#FFFFFF 1px solid;
background-image:url(images/333333.png);
width:850px;
margin:0 auto;
text-align:left;
font-size:medium;
background-color:#333333;
color:#FFFFFF;
padding-bottom:30px;
overflow:hidden;
}

I would also consider changing the cursor to pointer on mousing over the links - it is not obvious they need to be clicked.

Cheers
Graeme

s0nofr4g3
04-23-2007, 07:17 AM
yep

i just got up after 3 hrs of sleep, and realized how dumb I was when I came back here checking... :o I had tried a few overflows, but thought 'hidden? that'll just make my container stay the same size and make anything below it disappear....' :rolleyes:


THANK YOU for your help! it's incredibly appreciated!!! :D ;)