2. Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not
official document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
4. History
Ethan Marcotte coined the term responsive web design
(RWD) in a May 2010 article in A List Apart. He described the
theory and practice of responsive web design in his brief
2011 book titled Responsive Web Design. Responsive design
was listed as #2 in Top Web Design Trends for 2012 by .net
magazine.
5. So What’s Responsive Website
Website that automatically adjust their Size and Shape depending on the
device they're being viewed on.
8. How it Works !
A new addition to CSS3 is an element called a Media query, A media
query allows CSS code to be executed only when certain constraints are
met.
For instance, you can set the media query to turn the background color of
the webpage blue only when the browser size is 480px.
So using media queries, you can have several different sets of CSS for your
website that can be activated for many different devices or any browser
sizes.
9. How To Create Media
Queries !
Media Queries are elements of CSS3, so they go in the CSS portion of your
webpage. Normally the CSS is located in the header using style tags. To
create a media query, just add the code below to your CSS.
Then after the @media declaration, you can set the parameters you want to
target, such as browser size or device size. For browsers, you can use the max-
width attribute. For devices, you can use the max-device-width attribute. To set the
media parameters in between a maximum value and a minimum value, you can use
both the max-width and min-width attributes within the same parameter.
<style> @media { } </style>
10. How To Create Media
Queries !
<style> @media { } </style>
The only thing left to do now is to add your own custom CSS code in between
the curly brackets. The CSS can be minimal changes, or you can completely
change the design and makeup of the entire site. How much or how little is
completely up to you.
<style>
@media screen and (max-width:480px)
{ div.main{ width:300px; }
div.row2col1{ font-size:0.5em; }
img{ width: 250px; }
p.welcome { font-size:0.8em; }
p.content { font-size:0.7em; } } </style>
12. If this presentation helped you, please visit our
page facebook.com/baabtra and like it.
Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com