Darkmatter5 Posted November 20, 2008 Share Posted November 20, 2008 Here are my two divs #tools { min-height: 87%; width: 20%; position: absolute; margin: 0; background-color: red; right: 0; z-index: 2; } #tools_login { height: 110px; width: 100%; border: 1px solid black; } Tools is the parent of tools_login, but tools_login extends past the edge of tools. I suspect it's extending 2px as the border is 1px and there is a border on each side, so it pushes out 2px. Atleast that's my theory. How can I fix this? Link to comment https://forums.phpfreaks.com/topic/133556-how-to-keep-a-bordered-div-from-extending-outside-the-confines-of-its-parent/ Share on other sites More sharing options...
dropfaith Posted November 21, 2008 Share Posted November 21, 2008 i would drop the 100% to say 98 or so i feel that 100% with borders cramps things a bit with the border anyways.. i like having a bit of space between elements its just my thoughts tho Link to comment https://forums.phpfreaks.com/topic/133556-how-to-keep-a-bordered-div-from-extending-outside-the-confines-of-its-parent/#findComment-694845 Share on other sites More sharing options...
BoltZ Posted November 21, 2008 Share Posted November 21, 2008 Yea if its extending maybe 1-2 % past it just lower that. Link to comment https://forums.phpfreaks.com/topic/133556-how-to-keep-a-bordered-div-from-extending-outside-the-confines-of-its-parent/#findComment-694950 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.