Jquery/JS whiz?
- Started
- Last post
- 25 Responses
- 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
Heres a bare version.
- Noggin0
Def an overflow issue tho.
Ill have pull it from our internal dev site and strip out all the dev crap.
- acescence0
no worries, only took me a second, though your offer is appreciated!
- acescence0
so it's basically the same, you've just added another surrounding div?
- 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.
- robot520
you should post a link to your site or dump a sample in pastebin.
- spraycanII0
for parsing some sql request , Tables. All the time divs is a waste of time. fuck code
- 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.
- 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.
- 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?
- bigtrick0
damn acescence.. you are not only a good js hacker, but a good samaritan too.
- monNom0
the correct answer:
"fuck-it, use a table"
- acescence0
sorry, this will fail miserably if you have any other divs within the rows, change the $("div",this) selectors to $(".block",this)
- Noggin0
You sir, are a fucking genius. Thank you.
I hope this comes in useful for other people too.