Mobile CSS

Notice: get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /mnt/web006/d0/10/52591910/htdocs/cc/wp-includes/functions.php on line 3888

iphoneSurprised that my websites looked rather good on an iPhone 4, I took a closer look at them on the second hand mobile device my wife has (I don’t endorse Apple Corporation until I see solid proof of it being anything else than a capitalist enterprise with the compulsion of endless expansion).

Sorry to bother you with a political sneer, but hey, this is the Geek Connection, we are more than just computer nerds.

So here is the line of code you can add to your stylesheet:

/* Mobile */
@media screen and (max-device-width: 1000px) {
/* Your CSS here, for example */
#content {
margin : 0;
padding : 0;
}
}

Works brilliantly on my German blog.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.