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
    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

  • 7.82 miles on 03/11/18
  • 6.79 miles on 03/10/18
  • 4.80 miles on 02/04/18
  • 31.90 miles on 09/15/17
This Month:

14.61 miles

Last Month:

4.80 miles

This Year:

19.41 miles

Last Year:

354.90 miles