CSS overrides for iPhone & iPad

Website looking great? Did you check it on your phone? Or your iPad?

Sometimes buttons and things are bigger and ruins your layout etc. Whatever your issue is, you might not need a completely separate CSS file. You can override rules using this kind of thing:

/* iPad [portrait + landscape] */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
 input[type="submit"]
 {
 height: 36px;
 font-size: 16px;
 }
}
/* iPhone [portrait + landscape] */
@media only screen and (max-device-width: 480px) {
 input[type="submit"]
 {
 height: 36px;
 font-size: 16px;
 }
}

Easy as that!

Advertisements

One thought on “CSS overrides for iPhone & iPad

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s