Any way for internal div to adjust parent bounding box?
I'm trying to find out if there's a way to have a div within a div--the child relatively positioned or otherwise--change the parent's bounding box.
I've got a menu-submenu setup, where the submenu (teal) is a nested list, and consequently inside the main menu's (blue) list. The thing is, the main content div (violet) is right beneath it, and I want it to move down depending on whether or not there is a submenu present, or dependent on the size of the submenu div.
Check out the code (pasted here, and in the zip file if you want to see how it looks) and tell me what you think. There's no real way to do what I'm trying to do by using the "clear" attribute, unfortunately.
you didn't attach a zip file, but perhaps this will help.
I can't really see what you're going for through your example, but it seems like a run-of-the-mill dropdown, in which case Vladdy's will work perfectly. Perhaps once you attach your zip your goal will make more sense.
Ah. I guess it didn't upload because I made a rar file out of it.
Anyway. Now you can see what I mean, in color! Essentially, I just want the teal div (inside the blue div) to, because of its position and size, increase the overall size of the blue div, and consequently push the violet div down.
Maybe that makes sense.... I'll check out your link--thank you!
Optional signature you may use to appear at bottom of your posts.
Well, it's coded to be inside the blue div. It's relatively positioned inside it, and I want it to change the bounding box on the blue div, so that the violet one falls beneath it instead of acting like the blue div was the only one there.
Optional signature you may use to appear at bottom of your posts.
alright, I'm not entirely sure here, but I believe that so long as #menu's height is not explicitly defined, it will form to the height of its child.
EDIT:
just as a side note, you have far too complex CSS. I was able to simplify your sheet to this:
Yeah, the reason for the complexity is that I just sort of snagged the example from the even more complex (gasp!) layout code that I'm mucking around with right now
I think you solved my problem though. Many thanks!
Optional signature you may use to appear at bottom of your posts.
Bookmarks