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.

Recent Cycling

  • 31.90 miles on 09/15/17
  • 9.30 miles on 09/09/17
  • 8.70 miles on 09/08/17
  • 8.60 miles on 09/04/17
This Month:

0.00 miles

Last Month:

0.00 miles

This Year:

354.90 miles

Last Year:

604.10 miles