In very simple language the website which fit in any resolution with the help of CSS is know as responsive web design. Now a days mobile and tablet users are increasing day by day, So you need to create such a web site which fit in all media. You can create responsive web page with the help of HTML5 and CSS3. Before designing your web page keep it in your mind that each and every part of your web site need to be responsive / auto resizable as the browser width changes. Photo gallery, image stroller, top menu, footer links every thing should be resizable.
With the help of CSS3 media queries you can create responsive web designs. CSS3 media queries accept AND, NOT with features like width, height, max-width, max-height, device-height, orientation, aspect-ratio, resolution etc.
There are three way to implement media queries:
1. Using @import rule
2. Writing Media Queries Directly in a Style Sheet
3. Include a query in a linked style sheet's media attribute
@import url(style600.css) screen and (min-width: 600px);
@media screen and (min-width: 600px){
#section{
width: 550px;
}
}
<link rel="stylesheet" type="text/css"
media="screen and (max-device-width: 600px)" href="style600.css" />
Another important option in Responsive Web design is defining Viewport in meta tag. Viewport meta tag is used to control layout on mobile browsers.
<meta name="viewport" content="width=device-width, initial-scale=1,
maximum-scale=1">
Many sites set their viewport to "width=320, initial-scale=1" to fit better in iPhone, or other device having viewport 320. Please note that the screen resolution is not always same as viewport. Click here to see screen resolution and viewport of different devices.
<meta name="viewport" content="width=320, initial-scale=1">