Jquery/JS whiz?
- Started
- Last post
- 25 Responses
- bigtrick0
damn acescence.. you are not only a good js hacker, but a good samaritan too.
- Noggin0
I should add that right now its the box is contained within 2 divs (one of which uses the bg image 'hack').
Tried to make sense of the JS but I guess I dont make the grade.
- acescence0
i'm not sure i understand. the containing div should be the same height as the tallest child div after you clear the floats.
- spraycanII0
for parsing some sql request , Tables. All the time divs is a waste of time. fuck code
- robot520
you should post a link to your site or dump a sample in pastebin.
- Noggin0
Dear Acescence,
Ive had to come back for another fix for this. I figured with your solution I dont need the bg image hack anymore since I can just use a bg in each box.
Doesnt work that way tho as its the containing div that is being auto-height adjusted (the one with the bg image hack).
Is there a way to auto height the box itself?
- Noggin0
Def an overflow issue tho.
Ill have pull it from our internal dev site and strip out all the dev crap.
- acescence0
you could just give them different classes and target them separately
$(".block").equalHeights();
$(".block2").equalHeights(800);
$(".block3").equalHeights(100,50...
etc..
- acescence0
no worries, only took me a second, though your offer is appreciated!
- Noggin0
Heres a bare version.
- acescence0
it's because the images inside content_box are floated. floating takes them out of normal flow and isn't calculated in the height. if you clear the floats so content_box wraps around them, then the heights will be calculated properly.
- Noggin0
The page may contain like 20 boxes (say 10 rows each with 2 boxes in), that will probably be generated from a database so giving each box an id/class name wont work.
- robot520
if there are only 2 boxes per row, write a loop that compares the heights of the even-th and odd-th. adjust the heights to whichever has the greatest.
- Noggin0
Heres the barebones version...
http://s90652007.onlinehome.us/b…
So I want the the content_box to be 100% of its surrounding div and will have a bg image.