Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3239994
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:02:05+00:00 2026-05-17T18:02:05+00:00

I want to change my web page CSS for web browsers running on cell

  • 0

I want to change my web page CSS for web browsers running on cell phones, like the iPhone and Android. I’ve tried something like this in the CSS file:

@media handheld {
  body {
    color: red;
    }
  }

But it doesn’t seem to have any effect, at least on the iPhone. How can I write my CSS to work differently on the iPhone etc, ideally without using javascript?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:02:05+00:00Added an answer on May 17, 2026 at 6:02 pm

    You can use @media queries:

    <link rel="stylesheet" href="path/to/iphone.css" media="only screen and (max-device-width:480px)"/>
    

    This particular version will target the iPhone (and any other device with a screen of max-device-width of 480px.

    Apple, for the iPhone, though this is from memory so I can’t be entirely sure of its accuracy, chose to disregard the use of handheld or mobile stylesheets, since it, and other iOS devices, were capable of rendering css more or less on a par with desktop browsers, via Safari. For other devices I’m unsure, exactly, how faithful they are, though the A List Apart article (linked-to above) gives a brief run-through of some.


    Edited in response to comment, from @Colen:

    Hmm, it looks like a lot of new mobile devices have higher resolutions (e.g. droid X is 854×480). Is there any way to detect those? I don’t think those are being handled with this query.

    I’m unable to say for certain, since I’ve no access to those devices, however another A List Apart Article: Responsive Web Design notes that:

    Thankfully, the W3C created media queries as part of the CSS3 specification, improving upon the promise of media types. A media query allows us to target not only certain device classes, but to actually inspect the physical characteristics of the device rendering our work. For example, following the recent rise of mobile WebKit, media queries became a popular client-side technique for delivering a tailored style sheet to the iPhone, Android phones, and their ilk.

    So I presume that they, Android devices, must be target-able by @media-queries, but, as noted, I’m unable to say with any certainty.

    To target device-resolution, there is an example of:

    <link rel="stylesheet" type="text/css" media="screen and (max-device-width: 480px) and (resolution: 163dpi)" href="shetland.css" />
    

    Further reading: W3 Candidate Recommendation for media queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to change some things on my web page. Also I would like
I have a web 2 template with external css sheets. I want to change
Using CSS Style Sheet In my web page, i have two class like menu
Suppose my web page has a struture like this: <body> <div id=fee> <div id=fi>
I want to change the title showing in a page based on information I
So I tried creating the slide up down effect like in this example, http://paulsturgess.co.uk/articles/show/83-jquery-text-slide-up-slide-down-effect
I have a .aspx page which I want the browser to treat like a
I am creating a web page, where I have an image that I want
CSS and Javascript files don't change very often, so I want them to be
I have a web page on which there are several buttons and i want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.