Sponsors

 
Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

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?

-webkit-tap-highlight-color:

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.

Wednesday, October 10, 2007

CSS Styling Issues

I've been doing a little work on my "super-secret" iPhone project and I noticed that my page layout is more messed up than usual. Me-thinks it has something to do with the 1.1.1 update! Alot of the style sheet stuff I used is copied right out off Joe Hewitt's iUI css file. I guess that might mean that iUI got messed up too. I haven't had a chance to bring up the sample on his site on my iPhone.

Looks like I have some style fixin' to do! Fortunately, though it messes stuff up, it doesn't mess things up enough to make the application useless.