Monday, October 29, 2007

Disabling or Changing the Color of Tab Highlight Color

You may have noticed that when you tap a link on a web page in Safari on your iPhone that it lightlights the area a light gray. For normal web pages this might be okay. I mean, it's nice to get a visual queue that the page is responding.

But let's suppose that you want to control the highlighting. And you don't like Apple's light gray color. Maybe you want to do some super-cool highlight routine controlled by a Javascript routine, or you want to do things the same way but you want the color to be blue or something. How do you:
  • Change the highlight color, or...
  • Get rid of Safari automatically highlighting your tab all-together?


I'm a control-freak when it comes to programming so when I saw this I was like really happy! If you use the rgb() function with the fourth parameter, you can set the opacity. Setting it to zero hides the highlighting.

To see Apple's documentation on this CSS tag with examples click here.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.