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 8029049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:19:16+00:00 2026-06-05T00:19:16+00:00

I need to change style on a page depending on if it’s a handheld

  • 0

I need to change style on a page depending on if it’s a handheld device (such as a cell phone) or a large screen device, such as a laptop, stationary pc or a tablet.

I know I could detect the resolution by the css max-width query and alike, but that does not feel convincing. Mainly because today’s smartphones have such high-res screens. I.E. the Sony Xperia S, it has got a 720p by 1280 screen, but it’s only 4,3″. Whereby a 10px font, which on a normal computer screen would be readable, will become too small to read.

Therefore I need to know a bit more than just the resolution to know whether it is a small screen device or not. (and I assume the media=”handheld” css style is the way to go. Please correct me if I’m wrong).

So: what parameters does the css media type “handheld” care about?

  • Device screen size?
  • Browser window size?
  • Bandwidth?
  • Is the information whether the device is “handheld” or not just a parameter that’s passed by the client?
  • Are tablets included as “handheld” devices?

etc.

Thank you!

  • 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-06-05T00:19:17+00:00Added an answer on June 5, 2026 at 12:19 am

    The handheld media type is largely useless, because current generation smartphones and like devices (at least Android and iOS stock browsers) do not use it to avoid being given super-minimal formatting designed for older devices.

    I recommend using media queries. Note that you can query the resolution as well as the size, and you can query the size in physical units (in, pt, cm) as well as pixels. (I don’t know whether devices report reasonably accurate physical unit sizes, however.)

    However, whenever practical, you should not design for particular devices but so that your site works well at any scale (the current buzzword for this is responsive design, and much has been written on techniques for this). My personal approach is to write my style sheet almost entirely in terms of em (line height units), and then use media queries to switch out the layout in cases where a particular layout only works well on a certain size range; and since the size is defined in terms of em, the media query should be written in terms of em as well. The advantage of this is that the font size is a reasonable proxy for what is a reasonable display size for items on screen — reflecting the viewing distance and (if the user has taken the time to configure their browser) the user’s eye/hand abilities.

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

Sidebar

Related Questions

I need to screen scrape a web page and change its style to match
I need to change the spinner's style because if i place the spinner in
How to change color of selected ListPicker Item in Full Mode? What style need
I need to change the style of the tag, but i will be inside
I have a three elements and I need to change style of one element
I'm working on a spring mvc project. I need to change the style of
Is it possible to change a value of a css style after the page
I changed the input file button style with jquery, but i need space between
I need change background of all text that have two spaces from the start
i need change color of SystemTray.ProgressIndicator color, how i can do it? I tried

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.