how to make responsive website for all devices

37,225

Solution 1

Determine which devices you want to support and then add a stylesheet with something along these lines:

/* =Responsive Structure
----------------------------------------------- */
@media (max-width: 800px) {
       /* Smaller Resolution Desktops and Laptops */
       [...]
}
@media (max-width: 650px) {
       /* Smaller devices */
       [...]
}
@media (max-width: 450px) {
       /* Even Smaller devices */
       [...]
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
       /* Even Smaller devices */
       [...]
}

It's easiest to test if they go in descending order. more example media queries here:

http://css-tricks.com/snippets/css/media-queries-for-standard-devices/

Solution 2

In my case I need to re-write the website from scratch because my responsive style file didnt resolve the problem.. So I rewrite my Styles using LESS and the I create a responsive stylesheet with the correct media queries like Matthew Darnell do.

I'm not familiar with Skeleton but Twitter Boostrap works fine for me.

Share:
37,225
Joe Bobby
Author by

Joe Bobby

Updated on December 04, 2021

Comments

  • Joe Bobby
    Joe Bobby over 2 years

    I've used Zurb Foundation and Skeleton before so I'm familiar with both but I never had to convert an existing website to a responsive website before. Whats the quickest method to convert my website? Using a framework like above, or adding Media Queries for the code already provided? (Does that even work?)