Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to handle different screen resolution/screen size when developing a site?

I would like to develop a site using jQuery that will work with all major browsers. I thought to start with a basic layout (a header, a couple of tabs with content, and footer). I wonder how should I create this layout to support different screen resolution, screen size, or window size. Should I work in pixels / points / percents when defining width and height of the components ? Are there any jQuery plugins that can help me with this task ? Thanks !

like image 650
Misha Moroshko Avatar asked May 29 '10 04:05

Misha Moroshko


People also ask

How do websites cope with different screen sizes?

Sites do not automatically adapt to different screen sizes. Some websites are designed to format for variable screen sizes, but their elements may not auto-scale. This would result in the site automatically adjusting itself for various screen sizes, but the elements in the site may look too large on smaller devices.


1 Answers

There are a number of solutions to this problem, but they are primarily dependent on what kind of content you are wanting to share through the site (ie embedded videos or images which may have a finite size) and the look and feel you are going for.

For web layouts which work well in multiple browsers and across a wide range of window sizes, you should be looking at "Liquid Layouts". Below are a few links to tutorials about these layouts.

  • Liquid layouts the easy way | Max Design
  • Liquid CSS Layouts - Design Alternative to Table Based Websites
  • Fixed Width Layouts Versus Liquid Layouts

You can also use Javascript (including jQuery) to tweak the styling/content based on the window resolution (for instance, changing from a multi-column layout to a single-column layout for smaller screens, such as mobile phones). This is called "Adaptive Content".

  • Adaptive CSS-Layouts: New Era In Fluid Layouts?
like image 98
Luke Stevenson Avatar answered Sep 19 '22 01:09

Luke Stevenson