On Firefox/Chrome/Opera/Etc, this CSS works great and the 3 columns are side by side. On IE, the columns are vertical and are not side by side.
What’s an easy fix/hack for this? Thanks!
<style>
.col1 {
float: left;
width: 270px;
position: relative;
padding: 15px;
margin-bottom: 10px;
}
.col2 {
float: left;
width: 270px;
position: relative;
padding: 15px;
margin-bottom: 10px;
margin-left: 10px;
margin-right: 10px;
}
.col3 {
float: left;
width: 270px;
position: relative;
padding: 15px;
margin-bottom: 10px;
}
</style>
The html:
<body>
<section class="col1">
<p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
</section>
<section class="col2">
<p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
</section>
<section class="col3">
<p>Lorem Ipsum is simply dummy text of
the printing and typesetting industry.</p>
</section>
</body>
You can use this script in your head section:
IE 8< doesn’t recognize the
sectionelement. The problem is that browsers have special treatment for tags they don’t recognize at all; basic things like styles being applied and being able to contain sub-items won’t work.