I'm trying to use css borders to visually group my sections, but the border that is drawn for my second section encompasses the first, so it looks horrible. How can I make the borders right.
My code:
My first div is float left, and its border shows up correctly, encompassing only the area it needs. It has mostly input elements down the left side of the page.
<div style="float: left; margin-right: 40px; border-width: medium;
border-color: Black; border-style: solid">
My second div also is mostly textboxes and labels, and it has this div declaration:
<div style="border-width: medium; border-color: Black;
border-style:solid">
Unfortunately, I must be missing something about the css box model as this border goes all the way to the left and encompasses the other div. I'm trying to just have two boxes that encompass each div so that there is some visual seperation and grouping. If I have to use something other than borders that's ok too.