Oh the fun we have working on so many different projects! Today I had to put a style on the actual embedded object since the div around it didn’t work out for it. Obviously, it couldn’t be as easy as it sounds so I thought I would pass on my workarounds for all of you. The following code assumes you are using the conditional IE CSS code from our blog at https://www.corephp.com/blog/easy-ie-conditional-css-with-no-hacks/
I have been developing for IE8 since it was first released. Although they say it’s a final build, it’s actually in a late beta stage. There are several key CSS commands that haven’t been completed yet (such as :first-letter) and some calculations that still aren’t right in the browser. This is why they built the compatibility mode into it. This creates a major issue for web developers because any conditional statements for IE8 that are put in will break the page once it is fixed. I have thought about every possible fix and the only reasonable solution that I’ve found is… kill it!
Any serious CSS person has hacked their way through more ‘Internet Exploder’ issues than they care to talk about. Even if there are only a few small issues to fix in an area, it can be difficult to track them through multiple style sheets (ie. conditional sheet for IE6 & 7). Hacks are just bad practice, so what can you do? There is a better way! I came up with a neat little piece of code that has greatly simplified my life when dealing with cross-browser compatibility.