Best sizes for Media Queries to target tablets, smartphones, laptops, and desktops

What are the optimal Media Query sizes for effectively targeting tablets, phones, laptops, and desktops?

For instance, considering that both the iPhone and Droid feature a screen size of 320X480, it is important to ensure that your design looks good at these dimensions due to their prevalence among various devices. What other sizes should you aim to optimize for? I am interested in a broad range of sizes beyond just those of iPhone and iPad, taking into account the wide variety of Android device sizes on the market.

@media screen and (max-width: 480px) { /* This would target landscape mode for devices like the Droid, iPhone 3, etc. */ }

@media screen and (max-width: 320px) { /* This would target portrait mode for devices like the Droid, iPhone 3, etc. */ }

Answer №1

Check out this helpful link for screen size information.

In my opinion, it's best to design medium screen sizes (1024x768) based on the dimensions of the iPad 2, since it is the most popular tablet device. Going any larger than that may result in a layout more suited for desktop screens.

When designing for Smart Phones, I suggest using a resolution of 960x640. However, keep in mind that this size may need to be adjusted for newer iPhone and Android models within the next year or even sooner.

Answer №2

Check out my approach at . I drew inspiration from the robust media queries found in Hardboiled CSS3 Media Queries, available at

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

When using a div element with position fixed and overflow scroll, the window scroll event in JQuery may not be triggered as expected

What is the reason for window scroll not being detected with elements in position fixed, despite having the overflow: scroll; property in the CSS? If the condition is as follows: <!doctype html> <html> <head> <style> bo ...

Incorporate a unique identifier for dynamic elements

Is there a way to give generated divs the same name so I can markup them easily? $.getJSON("data/reviews.json", function(data){ for(var i=0; i<data.length; i++) { var review = sym.createChildSymbol("Template", "content"); review.$("title").html ...

Removing Unnecessary Filler Content on My Website

Struggling with some custom code on my Squarespace website. I'm having trouble isolating and targeting a specific element in my custom CSS. Here's a link to the site: I've attempted using #main-navigation a.folder {padding: 0px}; in the gl ...

Using Javascript to prevent css from changing the display

I want to make some CSS adjustments to a single element using a single script, but I want all the changes to be displayed at once. For example: $("#someelement").css({width:"100%"}); //this change should not be displayed $("#someelement").width($("#someel ...

Utilizing jQuery in combination with HTML and CSS

I'm having an issue with implementing jQuery animations for adding a new row on form submit. Additionally, I need to dynamically add and remove classes with animation effects without altering the HTML or CSS files (as this project is for school). Her ...

Create a left-aligned div that spans the entire width of the screen, adjusting its width based on the screen size and positioning it slightly

I have a parent container with two child elements inside. I want the first child to align to the left side and the second child to align to the right side, but not starting from the exact center point. They should be positioned slightly off-center by -100p ...

Can JavaScript impact the appearance of the printed version of a website?

Just a quick question - I currently don't have access to a printer. My client is wondering if the hidden elements of the webpage (items that are only visible when clicked on) will be included when printing or if they will remain hidden? ...

Instead of relying on jQuery for styling, opt for CSS for a more

I came across this particular piece of code: $("#customTable tr:nth-child(odd)").addClass("newColour"); It's purpose is to apply a new color to every odd row in the table. Is there a way to achieve this using CSS alone, without relying on jQuery f ...

Navigating HTML Wordpress code for beginners

I am currently working on a project for my studies, creating a WordPress website. In order to pass the W3C HTML & CSS validation check, I need to edit the code to fix errors and warnings that are popping up. #1 Initially, I attempted to use the Appeara ...

What is the best way to avoid cluttering the URL with a lengthy list of HTML code when adding a navigation bar to a website

I have created a navigation bar with base.html, styles.css, and main.js. Within the navigation bar, I have included links to about.html and contact.html using: {%block content%} ... {%endblock%} However, when I click on the "About" link in the navigatio ...

revealing the excessive vertical space in the div upon clicking the link

Here is the structure: +-----------------------------------------------------------------------+ | | | heading {position: fixed;} | |________ ...

What is causing these headers for the children not to center properly?

I am trying to centrally align both vertically and horizontally the <div> element, with its child elements <h1> and <h2> being horizontally centered in relation to the parent <div>. To achieve this, I have created a specific class f ...

Require assistance resolving a CSS problem on IE8?

Greetings everyone, I am currently facing some compatibility issues with my style sheets, particularly in IE 8. The CSS code below functions perfectly in my Chrome/Firefox style sheet, but unfortunately, it does not have any effect on my IE stylesheet. # ...

What could be causing jQuery to overlook the content within my div element?

I have a basic toggle feature for a div connected to a checkbox. $('#step2').hide(); $('#toggle-check').click(function(){ $('#step2').fadeToggle(); }) Why is .hide() not working to hide the contents of #step2? The content ...

Employing jQuery to eliminate background image from a specific list

Looking for a way to eliminate the background image from a specific list within an unordered list tagged with the dfwp-list class? Unfortunately, my current code isn't doing the trick. $("ul.dfwp-list > li").css('background-image':' ...

Instructions on filling the star icon with color upon clicking the button

Currently working on a project using codeIgniter where I have a form for rating products. I am facing an issue where, upon clicking the star button, only the border color changes to yellow while the center of the button remains white. Can someone please g ...

Ensure all input-group-addons have equal width with Bootstrap 4

Can the width of all prepend add-ons be made the same? For example, in this image, I would like Email, License Key 1, & License Key 2 to have equal lengths. Is this achievable? If I were to forgo add-ons and only use regular labels and a form grid, it wo ...

Differences Between Mobile and Desktop Browser Media Queries

As I work on creating a responsive website, I have come across various examples of sites that adapt well to both desktop and mobile browsers. Currently, my stylesheet setup includes different media queries for various screen sizes. However, I've notic ...

Generating HTML tables with charts using FireFox

I am encountering an issue: My table contains charts and tables that are displayed correctly in browsers. However, when I attempt to print it (as a PDF) in Mozilla Firefox, the third speedometer gets cut off, showing only 2.5 speedometers. Using the "s ...

What is the best way to position a background image at the top of a div without overlapping the

I have this HTML code: <div class="page"> <div id="header"> ... </div> </div> Below is my CSS: .page { width: 1028px; background-color:#103250; margin-left: auto; margin-right: auto; } ...