I am struggling with a basic CSS layout issue. I have a div container with content that I am trying to divide into two sections using the float property. Despite applying the float to the elements within the div, they do not stay inside as expected.
https://i.sstatic.net/Ybyhx.png
.content {
border: 5px solid #0099CC;
width: 90%;
min-width: 1000px;
margin: auto;
}
.left {
float: left;
width: 300px;
}
.right {
float: right;
width: 700px;
}
<div class="content">
<p>This is my content page</p>
<div class="left">
<form>
<fieldset>
<legend>User Login</legend>
</fieldset>
</form>
</div>
<div class="right">
<form>
<fieldset>
<legend>Main Area</legend>
</fieldset>
</form>
</div>
</div>
After removing the float property, the fieldset elements display correctly within the div content. This leads me to believe that the issue may be related to the float property in my CSS.