Webmaster GAF, I need your help.
I'm working on a website and there's a catalog of machines that one can rent.
The category page looks like this:
HTML code (I'm not including the content of each tile, because it seems that's not the issue here)
and the CSS:
Looks simple, right? Everything work great in Firefox, Chrome, Opera and IE8 & 9.
However, for some reason this is how it looks in IE7:
The left-margin in .iconLeftW class is completely ignored and thus everything is moved to the left side. The margin-left works when either float:left or position:relative property is disabled in .iconW class, but not when both of those are enabled.
Similar thing happens on another page:
Normal browsers:
IE7:
HTML
CSS:
I was googling yesterday thinking it must be some sort of bug in IE7, but couldn't find anything (found out about a bunch of other CSS bugs in IE7 - didn't think there's so much of them D
. I don't know why is this happening and can't find a way to resolve it. I need the "position: relative" property because of what's happening inside those divs, and obviously I need float property to arrange divs around.
So, can anyone help me with this issue?
I'm working on a website and there's a catalog of machines that one can rent.
The category page looks like this:
![AEnNb.jpg](http://i.imgur.com/AEnNb.jpg)
HTML code (I'm not including the content of each tile, because it seems that's not the issue here)
Code:
<div id="content">
<div id="list">
<div class="iconW iconLeftW" />
<div class="iconW iconRightW" />
<div class="iconW iconLeftW" />
<div class="iconW iconRightW" />
<div class="iconW iconLeftW" />
<div class="iconW iconRightW" />
</div>
</div>
and the CSS:
Code:
#content {
min-height: 500px;
padding: 10px 20px 20px;
width: 710px;
}
#list {
overflow: hidden;
padding: 40px 0 31px;
width: 100%;
}
div.iconW {
height: 92px;
}
div.iconW {
float: left;
margin-bottom: 15px;
position: relative;
width: 300px;
}
.iconLeftW {
margin-left: 33px;
margin-right: 20px;
}
.iconRightW {
margin-left: 20px;
margin-right: 33px;
}
Looks simple, right? Everything work great in Firefox, Chrome, Opera and IE8 & 9.
However, for some reason this is how it looks in IE7:
![hMp7S.jpg](http://i.imgur.com/hMp7S.jpg)
The left-margin in .iconLeftW class is completely ignored and thus everything is moved to the left side. The margin-left works when either float:left or position:relative property is disabled in .iconW class, but not when both of those are enabled.
Similar thing happens on another page:
Normal browsers:
![s90V3.jpg](http://i.imgur.com/s90V3.jpg)
IE7:
![xH4In.jpg](http://i.imgur.com/xH4In.jpg)
HTML
Code:
<div id="content">
<div id="list">
<div class="iconM" />
<div class="iconM iconRightM" />
<div class="iconM iconRightM" />
<div class="iconM" />
<div class="iconM iconRightM" />
<div class="iconM iconRightM" />
</div>
</div>
CSS:
Code:
#content {
min-height: 500px;
padding: 10px 20px 20px;
width: 710px;
}
#list {
overflow: hidden;
padding: 40px 0 31px;
width: 100%;
}
div.iconM {
float: left;
height: 172px;
margin-bottom: 24px;
position: relative;
width: 220px;
}
div.iconRightM {
margin-left: 24px;
}
I was googling yesterday thinking it must be some sort of bug in IE7, but couldn't find anything (found out about a bunch of other CSS bugs in IE7 - didn't think there's so much of them D
So, can anyone help me with this issue?