GuitarGod Posted June 8, 2012 Share Posted June 8, 2012 Hi all, I'm creating a page with some floating DIV menus - using the position:fixed style attribute. Example: <div id="div1" style="position:fixed">some content <div id="div2" style="position:fixed">big content</div> </div> My problem is that the content in div2 is limited to the size of div1, but I thought putting the position:fixed attribute means that the content of div2 could be as big as it wanted as the div is "free" - if that makes sense? Is there any way around this? Thanks for any and all help! Quote Link to comment https://forums.phpfreaks.com/topic/263884-floating-div-inside-of-a-floating-div-content-squashed/ Share on other sites More sharing options...
noober Posted June 9, 2012 Share Posted June 9, 2012 It makes perfect sense that the inner div couldn't be any bigger than the container div. That's the exact reason why you would put div2 inside of div1. If you want both to be "free", don't nest them inside of each other. <div id="div1" style="position:fixed">some content</div> <div id="div2" style="position:fixed">big content</div> It's a shot in the dark, but I believe you might be able to make the inside div bigger than the container div, if you don't have overflow:hidden set in your css. I could be wrong though. Quote Link to comment https://forums.phpfreaks.com/topic/263884-floating-div-inside-of-a-floating-div-content-squashed/#findComment-1352375 Share on other sites More sharing options...
GuitarGod Posted June 9, 2012 Author Share Posted June 9, 2012 It makes perfect sense that the inner div couldn't be any bigger than the container div. That's the exact reason why you would put div2 inside of div1. If you want both to be "free", don't nest them inside of each other. Excellent advice, I didn't even think of doing it that way - problem solved. Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/263884-floating-div-inside-of-a-floating-div-content-squashed/#findComment-1352419 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.