
The term Responsive Web Design was coined by Ethan Marcotte, to describe the practice of flowing layouts, page elements and images, by leveraging media queries to support various device display properties. As the name suggests, this design technique allows a web page to respond in real time to both a users behavior (browser window size), and device platform (including orientation).
Code example of a responsive web page
Portrait Tablet
@media (min-width: 481px) and (max-width: 768px)
Landscape smart phone
@media (min-width: 321px) and (max-width: 480px)
Portrait smart phone
@media (max-width: 320px)
@media (min-width: 481px) and (max-width: 768px)
Landscape smart phone
@media (min-width: 321px) and (max-width: 480px)
Portrait smart phone
@media (max-width: 320px)
Start
by creating the standard CSS classes and setting default properties. I
marked-up my CSS defaults to support both desktop and landscape tablets
by limiting the major elements to a width of 1000px.
The media queries
<style type="text/css">
#banner {
margin-left:auto;
margin-right:auto;
width:1000px;
}
.
.
.
.widget-text {
padding:10px;
back grou nd-c olor :#FC FCFC ;
}
</style>
The media queries
Next
create the media queries for each screen dimension your interested in
supporting (responding to). Media queries are exactly like any other
CSS element, you are simply providing an alternative set of CSS
properties for the existing elements on your web page. The browser will
respond by calling the proper @media each time the web page is loaded
or a user re-sizes the browser window. Here are the three media queries
I added support for:
Media queries enable my example to support landscape and portrait mode cleanly
<style type="text/css">
@media (min-width: 481px) and (max-width: 768px) {
#banner { width:740px; }
#banner img { max-width:740px; max-height:222px; }
#main { width:740px; }
#main-content { width:450px; float:left; }
#widget-container { width:200px; float:right; }
.widget-content { width:160px; }
}
@media (min-width: 321px) and (max-width: 480px) {
#banner { width:450px; }
#banner img { max-width:450px; max-height:135px; }
#main { width:450px; }
#main-content { width:400px;}
#widget-container { width:400px; }
.widget-content { width:120px; margin:5px; float:left;}
.widget-text { display:none; }
}
@media (max-width: 320px) {
#banner { width:275px; }
#banner img { max-width:275px; max-height:83px; }
#main { width:250px; }
#main-content { widt h:25 0px; padd ing: 0px; }
#widget-container { width:250px; padding:0px; }
.widget-content { width:250px; margin:5px;}
.widget-text { display:none; }
}
</style>
Media queries enable my example to support landscape and portrait mode cleanly
Hints and Tips
Important!
Set the following META keyword to force the device viewport to maintain
the correct scale. Failure to include this META will result in your UI
being pinched:
<meta name="viewport" cont ent= "wid th=d evic e-wi dth, minimum-scale=1.0, maximum-scale=1.0" />
You
can optionally configure webpages saved to the iphone's home screen to
launch
using WebKit directly. This will remove the Safari web browsers address
bar & bookmarks bar giving your web page a native appearance:
<meta name ="ap ple- mobi le-w eb-a pp-c apab le" content="yes" />
Optionally provide a thumbnail image to represent bookmarked pages in iPhone:
<link rel= "app le-t ouch -ico n"
href ="ht tps: //ww w.ib m.co m/de velo perw orks /myd evel oper work s/bl ogs/ bobl eah/ reso urce /dw- phon e.gi f"
/>
Next steps
You can run this example by clicking here.
As you resize your browser window to different widths you will see the
media queries adapt and flow the web page. You can download the
complete HTML and CSS of this example by clicking here.
Media queries are not a total answer to mobile views, as they don't address page weight issues, which is another major consideration for mobile design. Hiding a div or resizing an image has no impact on their contribution to overall page weight, as elements set to display:none are still part of the DOM, and simply hidden from displaying visually.
However, by starting with a sound minimal design, leveraging media queries can result in a workable mobile solution for your website. The key is careful thought to page elements, image sizes, and overall copy content.
For the entire definition and specifications on media queries, please visit the W3C Media Queries module.
Media queries are not a total answer to mobile views, as they don't address page weight issues, which is another major consideration for mobile design. Hiding a div or resizing an image has no impact on their contribution to overall page weight, as elements set to display:none are still part of the DOM, and simply hidden from displaying visually.
However, by starting with a sound minimal design, leveraging media queries can result in a workable mobile solution for your website. The key is careful thought to page elements, image sizes, and overall copy content.
For the entire definition and specifications on media queries, please visit the W3C Media Queries module.
Source: IBM.com
Its Good Examples creating website using html and css3, follow these example for any one who interesting to learn web designing or Join Best Web Designing Course at your location
ReplyDeleteIEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. A IEEE Domain project Final Year Projects for CSE system development life cycle is essentially a phased project model that defines the organizational constraints of a large-scale systems project.
DeleteIT Company Employess Productivity usually increases when a company implements corporate training courses on latest technologies.
corporate training in chennai
It Companies need of Corporate training programme arises due to improvement in technology, need for getting better performance or as part of professional development. corporate training companies in chennai Corporate Training refers to a system of professional development activities provided to educate employees.
corporate training companies in india
No doubt this is an excellent post I got a lot of knowledge after reading good luck. Theme of blog is excellent there is almost everything to read, Brilliant post.
ReplyDeletelos angeles logo design
Most of the time, web designers have their own unique style and you can easily spot which designs they've done in the past.besplatan sajt
ReplyDeleteWeb designers are in the business of selling web designs. That is the first principle of business for a web design firm, as it is for many other types of businesses.
ReplyDeleteThis article was written by a real thinking writer. I agree many of the with the solid points made by the writer. I’ll be back. Professional Website Design
ReplyDeleteWhat's the status of your web development company? Do you provide the services in all regions of the world? web development company
ReplyDeletePretty section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire actually enjoyed account your blog posts. Any way I will be subscribing to your augment and even I achievement you access consistently fast. web site hosting reviews
ReplyDeleteThis is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. Website laten maken
ReplyDeleteReally a great addition. I have read this marvelous post. Thanks for sharing information about it. I really like that. Thanks so lot for your convene. Immersive Learning
ReplyDeleteThese are some great tools that i definitely use for SEO work. This is a great list to use in the future.. web development outsourcing China
ReplyDeleteI have a hard time describing my thoughts on content, but I really felt I should here. Your article is really great. I like the way you wrote this information. cushion design
ReplyDeleteNice blog and absolutely outstanding. You can do something much better but i still say this perfect.Keep trying for the best. artisan decor
ReplyDeleteIt is imperative that we read blog post very carefully. I am already done it and find that this post is really amazing. large copper planter
ReplyDeleteThank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
ReplyDeleteWeb Design Training
You completed a few fine points there. I did a search on the subject and found nearly all persons will go along with with your blog. Graphic Design Courses
ReplyDeleteThis is an awesome post. Really very informative and creative contents. This concept is a good way to enhance knowledge. I like it and help me to development very well. Thank you for this brief explanation and very nice information. Well, got good knowledge.
ReplyDeleteWordPress development company in Chennai
You completed a few fine points there. I did a search on the subject and found nearly all persons will go along with with your blog. web development in nyc
ReplyDeleteI fortunately came across your article and I'm really impressed. This is really worth reading. Looking forward for your future write-ups.
ReplyDeleteManual Testing Training in Chennai
Manual Testing Training in Tambaram
Manual Testing Training in Porur
Oracle DBA Training in Chennai
Unix Training in Chennai
Embedded System Course Chennai
IoT Training in Chennai
Useful blog, This is what I have looked for. Share more like this.
ReplyDeleteDevOps certification in Chennai
DevOps Training in Chennai
AWS Training in Chennai
AWS course in Chennai
Data Science Course in Chennai
Data Science Training in Chennai
DevOps Training in Velachery
DevOps Training in Tambaram
Ukraine is one of the most popular areas for developing website templates. With this site you will be able to collect the best adobe muse templates of Ukrainian developers, created on the basis of Adobe Muse CC 2017, which are easy to edit and customize.
ReplyDelete"If you ever wondered who are the most sophisticated players in the IT outsourcing industry, I'd highly recommend checking out this article to learn more about outsourced product development.
ReplyDeleteThey are bound to seek "hand to hand fighting Chicago" or seo in haryana something comparable on the off chance that they're not exactly beyond any doubt what they're searching for.
ReplyDeleteWeb based business website configuration could be easy to use at last, yet it isn't constantly easy to set up toward the start. Exclusive Web Ltd
ReplyDeleteThe article is so informative. This is more helpful for our
ReplyDeleteselenium training in chennai
selenium online courses best selenium online training
selenium testing training
selenium classes
Thanks for sharing.
This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted.By Learn Digital Marketing Course Training in Chennai it will help to get Digital Marketing Course Training in Chennai.Learn Best Digital Marketing Course Training in Chennai's professional institute to get reputed job.
ReplyDeleteResponsive web design is a must for website these days as millions of users visit sites in their smartphone screen. Think to Share is one of the best place for creating responsive websites.
ReplyDeleteWeb Design Company in Kolkata
SEO instruments for Google, MSN and Yippee are various. SEO devices for public statement advancement were additionally propelled by PRWeb toward the finish of June called SEO Wizard. Webdesign
ReplyDeleteGreat Blog! That was amazing. Your thought processing is wonderful. The way you tell the thing is awesome.
ReplyDeleteWe are the best web design company in usa modify the website to respond to all screen sized devices and adapts its contents according to the screen to give your users an optimal and comfortable view.
Great Article
ReplyDeleteData Mining Projects
Python Training in Chennai
Project Centers in Chennai
Python Training in Chennai
Wow what a Great Information about World Day its very nice informative post. thanks for the post. design
ReplyDeleteImpressive web site, Distinguished feedback that I can tackle. Im moving forward and may apply to my current job as a pet sitter, which is very enjoyable, but I need to additional expand. Regards. app design agency
ReplyDeleteA responsive plan permits stacking of the site on all gadget types. Gadget recognition is conceivable through versatile structure, which permits dynamic improvement according to client prerequisites.premium wordpress blog themes
ReplyDeleteThe information you have posted is very useful. The sites you have referred was good. Thanks for sharing.. ui/ux design agency
ReplyDeleteThis was really an interesting topic and I kinda agree with what you have mentioned here! ux design for startups
ReplyDeleteIt was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. designer
ReplyDeleteIn this manner, all around arranged structure decreases the psychological burden. When this is accomplished, it will be simple for the client to explore through the website. Website design in Dubai
ReplyDeletePositive site, where did u come up with the information on this posting? I'm pleased I discovered it though, ill be checking back soon to find out what additional posts you include. wp plugins
ReplyDeleteThis is significant on the grounds that you will need your web-based social networking properties to work with the design of your web website. Webdesign
ReplyDeleteNice description which is given by you in this blog. Thank you for this blog.
ReplyDeleteShopify Developer in USA | Website Agency in USA | Cheap Website Developer in USA | Professional Website Developer in USA | Online Store Developer in California | Web Developer in California || E-Store Developer in California |
I appreciated your work very thanks top website development company
ReplyDeleteThis is the type of information I’ve long been trying to find. Thank you for writing this information. cheap instagram likes spread
ReplyDeletePossible require all types of led tourdates with some other fancy car applications. Many also provide historic packs and other requires to order take into your lending center, and for a holiday in upstate New York. ??? web design manhattan
ReplyDeleteYoure so cool! I dont suppose Ive read anything similar to this prior to. So nice to uncover somebody with many original applying for grants this subject. realy appreciation for starting this up. this fabulous website is one area that is required on-line, someone with a bit of originality. useful project for bringing new things to the world wide web! new york website design company
ReplyDeleteAwesome article! I want people to know just how good this information is in your article. It’s interesting, compelling content. Your views are much like my own concerning this subject. 50 instant instagram likes
ReplyDeleteI have to show some thanks to the writer just for bailing me out of such a dilemma. As a result of surfing throughout the online world and coming across strategies that were not beneficial, I believed my entire life was well over. Existing minus the solutions to the difficulties you have resolved all through the post is a serious case, and the kind that would have negatively damaged my career if I had not discovered your web page. Your own personal know-how and kindness in playing with every part was tremendous. I’m not sure what I would have done if I hadn’t come upon such a stuff like this. I can also at this moment look ahead to my future. Thanks very much for your specialized and results-oriented help. I won’t be reluctant to suggest your web site to anybody who needs guide on this subject matter. branding firms san francisco
ReplyDeleteAs soon as I discovered this site I went on reddit to share some of the love with them. san francisco brand agency
ReplyDeleteIt may be pervasive, but is it persuasive?smm panel
ReplyDeleteI have not checked in here for a while as I thought it was getting boring, but the last few posts are good quality so I guess I¡¦ll add you back to my daily bloglist. You deserve it friend web design tips
ReplyDeleteYour article has proven useful to me. It’s very informative and you are obviously very knowledgeable in this area. You have opened my eyes to varying views on this topic with interesting and solid content. website design agency
ReplyDeleteI love your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz answer back as I’m looking to create my own blog and would like to know where u got this from. thanks website tips
ReplyDeleteThis is a good source of information, I will often follow it to know more information and expand my knowledge, I think everyone should know it, thanks. Check out here more info about web design.
ReplyDeleteThank you, for providing this informative and comprehensive blog. This is very interesting Blog.
ReplyDeletePhp Web Development Company Bangalore | Online Store Developer | Internet Marketing Company in Bangalore | Web Solution Provider Bangalore
The information which you have provided is very good and essential for everyone. Keep sharing this kind of information. Thank you. IT support companies
ReplyDeleteI admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. creative website development service providers USA I am impressed with your work and skill. Thank you so much.
ReplyDeleteI read the above article and I got some different kind of information from your article about a mattress. It is a helpful article to enhance our knowledge for us. Thankful to you for sharing an article like this.award winning design
ReplyDelete