I
I
Ivan Drozhzhin2015-10-26 13:10:37
css
Ivan Drozhzhin, 2015-10-26 13:10:37

Why doesn't IE include styles?

Good afternoon.
There was a need to include a separate stylesheet for IE.
In the header, I wrote a link for IE like this:

<!--[if IE]><link rel="stylesheet" type="text/css" href="catalog/view/theme/OPC030062/stylesheet/IEStyle.css" media="all" /><![endif]-->

I open in IE, there are no styles.
I tried adding it like this:
<!--[if gte IE 7]><link rel="stylesheet" type="text/css" href="catalog/view/theme/OPC030062/stylesheet/IEStyle.css" media="all" /><![endif]-->

I open it and it's gone again.
I found on the net a mention that for IE styles can be set in a special way that other browsers do not see, for example, like this:
.block {
margin: 0 0 0 0; //Для всех браузеров
margin= 20px; //Правило для IE
}

But even so, the dog does not want to. Emphasizes this rule in the console (like che for x ...) and that's it.
The problem actually is that blocks with absolute positioning do not have the correct display.
This is how it looks on normal browsers:
92dc9e69375e442fb5c1e184f1e34f1b.png
And this is how it looks in IE:
770c3bb36427446b9c9ae12c655f4bc0.png
Here is a piece of style code for the price block and the buy button:
<div class="product-block-inner">
    <div class="image">
        <a href="http://pro-konditer.com/nabor-gelevye">
        <img src="http://pro-konditer.com/image/cache/data/krasiteli/438-150x150.jpg" alt="Набор гелевых красителей (24шт)"></a>
    </div>
    <div class="name">
        <a href="http://pro-konditer.com/nabor-gelevye">Набор гелевых красителей (24шт)</a>
    </div>
    <div class="price">4750р.</div>
    <div class="rating">
        <img src="catalog/view/theme/OPC030062/image/stars-5.png" alt="На основании 1 отзывов.">
    </div>
    <div class="cart">
        <a onclick="addToCart('424');" class="button"><span>Купить</span></a>
    </div>
</div>

#content .box-product .price{
  margin-bottom: 8px;
  position: absolute;
  bottom: 55px;
  left: inherit;
  display: inline-block;
  margin-left: -28px;
  color: #9B0000;
  font-weight: bold;
  font-size: 20px;
}
.product-grid-list .cart,
#content .box-product .cart , .related-products a.button{
  position: absolute;
  left: inherit;
  display: inline-block;
  margin-left: -35px;
  bottom: 22px;
}

Tell me how can I include styles or how to align blocks in IE?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-10-26
@RotarYMonkeY

Conditional comments do not work since version 10.
In order to advise you on some solution to the problem, you need to see the entire code. From the piece that you posted, I can say that something strange is happening there and just what IE gives out is more like the truth.
In my experience, I haven't had to use any hacks since IE8, so it's very likely that you're shooting yourself in the foot somewhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question