Skip to main content

Responsive Web Design : Apply Different CSS for different resolutions

Responsive Web Design : Apply Different CSS for different resolutions

Change css depending on resolution
Continuing on responsive web design. As a reminder I base those tutorials on Video Tutorial from Stone River Learning on Responsive Web Design , very good intro to basics of Responsive Web Design, check it out!
Next logical question after we have figured out what resolutions to use is to find out how to apply different CSS styles for different resolutions.
To apply those you would have to use @media attribute of css, and it would look like this:
What we did here is we set minimum width of the device and are changing background colour (as an example) based on this minimum width.
To see this working, what you could do is to include this stylesheet in your HTML file:
Then go to your web page in the browser and try playing with browser window resolution (resize window), you would see how background colour changes.
Responsive Web Design | Change css depending on resolution
If you still figuring out what resolutions to target, check out this post”
If you have any questions or suggestions about next topics, please put that into comments section.
Anatoly

Comments

Popular posts from this blog

Top five MLM companies in Pakistan

There are several multi levels marketing (MLM) or direct selling companies in Pakistan since 1999 but some of them are better than the others. We have some big names in the list of MLM companies in Pakistan. These companies are local and international companies and also have a great reputation in the world. Here we are giving some important information about these companies for the people who are searching for their career company in Pakistan. These are the top five MLM companies in Pakistan . These are decided by the top network marketers and by the masters of all kind of marketing in Pakistan. The ELI Enlightenment through learning and implementation (ELI) is one of the best MLM or direct selling company in Pakistan and a pure Pakistani company in the area. This company is working on the educational products. These products are computer courses, ielts, spoken English and some kind of other courses. All courses are in DVD’s. These courses are very expensive in ...

Best Computer Courses to Get a Job

Best Computer courses to study to get jobs easily   Students must choose courses wisely. One must always choose courses that promise jobs. Jobs are limited nowadays. But the competition for jobs is ever increasing! This has led to unemployment of large number of qualified young men and women. This is where computer courses come handy. These computer courses are usually completed in less time. Further, they guarantee easy jobs. Here, I will introduce to you some best computer courses (job opportunity wise). Wikimedia Commons India is fast growing in the field of IT (Information Technology). According to some reports, the revenue generated from IT exports in the year 2012 was more than $100 Billion! Thus IT offers great opportunities. Also, an engineering degree in IT is not always required to bag IT job. Many times, one can get IT jobs after completing short courses of 6-1 year length. Thus, computer courses offer an array of advantages over other traditional c...

How to create a contact form with Bootstrap ? (JQuery/PHP/HTML5/JqBootstrapValidation)

How to create a contact form with Bootstrap ? (JQuery/PHP/HTML5/JqBootstrapValidation) ​ How to create contact Form - FREE PDF Code Examples Links to all the resources GIVE ME MY PDF! Hey guys! Today we will talk about such essential feature for any website as contact form. Recently, while working on one of the projects, I had a pleasure combining couple of very nice tools (Bootstrap 3 + JQuery + jqBootstrapValidation), which resulted in minimalistic , but powerful contact form, that would be a good addition to any website. VIEW DEMO            CODE In this post I will walk you through the process of developing this form. Also if you just want to put it in your website, just pulled from my github repo and have fun. Sounds good ? Let’s start. When I was developing my form I had in mind following goals: – Minimalistic design – Track person’s contacts for future commu...