Save the Internet: Click here


Kickass Web Design creates Custom Themes and Templates for WordPress, Cubecart, ModX, Movable Type, ZenCart, Joomla, Tolranet Directory Script and other web applications. We can match your current design or create something totally new and different. Interested? Request a Custom Template Quote.


A filter to feed stuff only to Opera

I’m working on a Joomla Template for a client, and it’s coming along, looks good in FireFox, looks good in IE6. Wow, it looks good in IE6? Double wow. Let’s check mac screenshots- nothing out of the ordinary, looking okay. So it should look just fine in Opera, right? Opera’s one of the GOOD browsers. Famous last words. What’s that horizontal menu doing hovering 5 pixels above where it should be?

So I’ve been hunting for the last hour on a way to feed Opera 6+ a value that none of the other browsers can see. And I finally found one.

`/* Opera 6+ specific values inserted here */`

`@media screen and (min-width: 0px) {`

`#yourdivorclasshere {`

`padding-top: 5px;`

`}`

`}`

In this particular case I put the value for my div for all the other browsers first, then followed it immediately with this Opera hack. Since only Opera sees this and it’s later in the cascade, Opera applies this value, while all the other browsers apply the original value.

And though I hope I never have to use this Opera Filter again, it’s nice to know there is one. I just hope it doesn’t come back to bite me in the butt in later Opera versions, which is always the problem with filters and hacks. Thanks go to Ron Pringle for this one. It worked even though it had NOTHING to do with tables or table captions. Cool beans.

Technorati Tags: , ,

Share this post:These icons link to social bookmarking sites where readers can share and discover new web pages.
  • blogmarks
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • Spurl
  • YahooMyWeb

Comments are closed.

Random Posts from my Portfolio

BlueBeyond Custom ModX Template with Lightbox Gallery
bluebeyondmx250.jpg