1

I've got an IE8 specifity problem which is driving me nuts: http://proffetdemo.themesforge.com/shop/

The following selector is applied correctly in Chrome/Firefox et. al.

.tfshop-3 ul.products li.product {
 width: 30.5% !important;
}

But in IE8 it is completely ignored. The selector above is an override of another selector:

ul.products li.product {
 float: left;
 margin: 0 0 20px;
 position: relative;
 width: 48%;
}

Anyone know why IE8 is ignoring the more specific selector?

UPDATE 1: 15/02/13 I now think this might be related to respond.js not loading correctly in IE8 - it looks like other media queries are not kicking in in IE8 - hmm...

asked Feb 15, 2013 at 15:58
12
  • 1
    You've got extra closing anchor tags with "tf_prodthumb_inner" which may be causing an issue. Commented Feb 15, 2013 at 16:01
  • @BillyMoat just spotted that issue - thanks for pointing it out - don't think it solves the IE8 issue though Commented Feb 15, 2013 at 16:14
  • @Mr.Alien not sure what you mean? Commented Feb 15, 2013 at 16:14
  • He means does the rule telling it to be 30.5% come after the ruling telling it to be 48%? Commented Feb 15, 2013 at 16:17
  • 1
    In your stylesheets you seem to have the 48% width declared first but you have the 30.5% width declared within a media query of (min-width: 768px). If that's the case then IE is behaving correctly and Firefox is wrong but I'm not sure why. Commented Feb 15, 2013 at 16:39

2 Answers 2

1

try adding the tag in front of the class. like div.tfshop ul.products li.product

Regexident
29.6k10 gold badges95 silver badges100 bronze badges
answered Feb 15, 2013 at 16:02
Sign up to request clarification or add additional context in comments.

1 Comment

thanks for the suggestion - I just tried that and it didn't make a difference to the IE8 problem
0
@media only screen and (min-width: 768px) {
 ...
 div.tfshop-3 ul.products li.product {
 width: 30.5% !important;
}
 ...
}

you have these styles defined into @media conditional queries which is not supported by IE8 and lower http://caniuse.com/css-mediaqueries

This is what http://wicky.nillia.ms/enquire.js/ probably could help to deal with it in easier way.

answered Feb 15, 2013 at 16:10

6 Comments

thanks for your answer dmi3y but I'm using Respond.js which does enable media queries in IE8
yep, probably it acted up, because if you remove media query everything started to work magically ;)
but I need the selector to render a different width within that media query :)
that's another question, I am trying to help you to find out why it is not working, as it was asked 'IE8 CSS higher specificity selector being ignored'
yip fair point - I now think the issue might not be one of specificity but one related to media queries - thanks for your input!
|

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.