I am currently redesigning a layout that is using tables for a two-column design but I have encountered some issues.
<div id="frame">
<div id="leftcol">
<div id="1">blah</div>
</div>
<div id="leftcol">
<div id="2">blah</div>
<div id="3">blah</div>
</div>
</div>
#leftCol
{
margin-right: 10px;
width: 49%;
float: left;
}
#rightCol
{
width: 49%;
float: left;
}
In the original setup, there was a two-column table with width=100%
which displayed correctly in Firefox. However, in Internet Explorer, the table overflowed the #frame
div container. To address this, I replaced the table with two floated divs but encountered challenges with equalizing the column widths.
All content is contained within the #frame
div, which has height constraints, padding, and margins to create a "gutter" around the edge of the page.
I aim to have the two floated DIV columns be the same width and sit alongside each other with a 10px gap between them. Setting both to width: 50%
did not work due to the narrower width of the #frame
container compared to the body of the page. When reducing the gutter padding, the layout functioned in Firefox but not in Internet Explorer.
Setting each column to width: 49%
resolved some issues but resulted in an unattractive appearance as the sizes varied across browsers and the right column did not align with the edge of the #frame
container.
I had attempted this approach before and reverted to using tables when it appeared to be functioning properly. However, now that I discovered compatibility issues with IE, I have spent hours trying to find a cross-browser CSS solution. Any suggestions?