My current code snippet is as follows:
...
<STYLE>
body{
position: static;
height: 95%;
width: 95%;
border: 2px;
border-style: solid;
border-radius: 5px;
border-color: black;
background-color: pink;
}
<STYLE>
...
<body>
<DIV id="div_1" >
<DIV id="div_2a" >
</DIV>
<DIV id="div_2b" >
</DIV>
</DIV>
</BODY>
...
Despite setting the height and width to 95% in the CSS, only the width appears to be working correctly. The height collapses, possibly due to the lack of content within the div elements. This behavior seems counter-intuitive. Additionally, the background color extends beyond the borders and fills the entire visible page area. I suspect that this could be caused by some default body CSS declaration. Can someone confirm this? And how can I prevent this unexpected behavior? If I modify the CSS to reference HTML instead, the border doesn't collapse, but the background color still spills outside the border. It almost feels like a bug at this point.