CSS Hack for Opera 7

Opera likes to take the lead on W3C initiatives, which is a good thing, but sometimes you can run into a problem with CSS in Opera. Certain styles will show up in Opera differently than they do in any of the latest verions of Mozilla and IE, because none of the other browsers stick to the W3C spec as hard as Opera. If you aren’t concerned with Opera when browser testing than don’t read any further. If you do check Opera and you want make a style that only Opera 7 can see, you can use CSS3 Media Queries to do a hack. Basically all you have to do is add “@media” around any attribute and only Opera 7 can see it. Here is an example:

@media all
    {
h1
    {
    margin-top: 0;
    }
    }

This let me fix the extra padding that only Opera tends to add sometimes. This might not work for long if the other browsers adopt more CSS3, but it’s a nice fix for now.

Comments are closed.

Recently on Twitter

  • Facebook for Android is hands down the worst app of any kind I have ever used.
    Feb 8, 2012
    via Twitter for Android
    from Bainbridge Island, WA
  • February, Bainbridge Island. http://t.co/1XyU7A7C
    Feb 4, 2012
    via Twitter for Android
    from Bainbridge Island, WA
  • Ohhh..having my own little toothpocalypse....Uff da
    Feb 1, 2012
    via Twitter for Android
    from Bainbridge Island, WA
  • While @Google pours tons of resources into all important Google+, I'm seeing a big quality drop-off in almost all of their other products.
    Feb 1, 2012
    via Twitter for Android
    from Bainbridge Island, WA

Recent Cycling

  • 13.40 miles on 02/02/12
  • 19.50 miles on 01/28/12
  • 28.30 miles on 01/27/12
  • 32.51 miles on 01/14/12
This Month:

13.40 miles

Last Month:

175.96 miles

This Year:

189.36 miles

Last Year:

724.76 miles