homer.j.simpson Posted January 16, 2010 Share Posted January 16, 2010 Is it possible to set attributes of container element so that it expands automatically to accommodate the child element it contains when that child element is populated to the point that it's height becomes greater than that of it's parent? If I use overflow attribute in this situation, it would show scrollbar which I don't want. Can it be solved by CSS or is it in Java terrority? Link to comment Share on other sites More sharing options...
Synook Posted January 16, 2010 Share Posted January 16, 2010 Why not just don't set a height for the parent? or you could try overflow:visible. Link to comment Share on other sites More sharing options...
homer.j.simpson Posted January 16, 2010 Author Share Posted January 16, 2010 Why not just don't set a height for the parent? or you could try overflow:visible.I can't just set to the specific height because that child element is intended to fill with search result based on criteria provided by the user. So it may contain no result or 40 at most(limit). The problem with the (overflow: visible) is that, it doesn't work gracefully with background. In firefox, container element stay at fix height when those overflow contents go past it's boundary. In IE, it does expand but two div sections at each inner side of centered <body> element which serve as shadow are not being repeated anymore.This one is pic of firefox.This one is IE. Link to comment Share on other sites More sharing options...
thescientist Posted January 16, 2010 Share Posted January 16, 2010 Why not just don't set a height for the parent? or you could try overflow:visible. Link to comment Share on other sites More sharing options...
homer.j.simpson Posted January 16, 2010 Author Share Posted January 16, 2010 Damn, I guess 32 hours straight awake effect was kicked in and didn't know what I read. Sorry. I'll see how that works. Link to comment Share on other sites More sharing options...
thescientist Posted January 16, 2010 Share Posted January 16, 2010 it happens. Have been pulling a work all nighter myself, so I know how you feel. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.