Mobile-First Design Strategy
In the current era, Responsive Website Design is essential to develop a site if you are making a site that can easily open on desktops, laptops, iPads, Mobiles, etc. In short, your site is clearly visible on all digital devices.
To achieve that purpose, you have to create your site responsive. This means, it covers all the different dimensions of all different devices.
Best Practices to Make Responsive Website Design (RWD).
- Give "width, padding-left, padding-right, margin-left, margin-right" in percentages (%). Because whenever you try to reduce or expand the width of screen, these CSS properties are automatically updated.
- Don't give "width, padding-left, padding-right, margin-left, margin-right" in pixels because it contains static values. It may not get changed when you try to shrink or expand your page.
- Always check the compatibility of your page in Mozilla Firefox, Google Chrome, Safari, Opera, IE 9 as well as the above versions.
- Don't nest block-level elements into inline elements. For example, <span><div></div></span>. It violates the standards of HTML.
- Use proper coding conventions and rules for HTML and CSS to develop a page.
- Study Best Practices for HTML and CSS before starting to make a page.
- Always make HTML first. After making HTML, write CSS for making RWD.
- If you are using any framework like Bootstrap, always look after for coding standards of HTML and CSS. Because in most cases, Bootstrap violates coding standards.
- Whenever you are creating your site, give most of the values of CSS properties in percentages (%), so that it will complete your 80% task for making RWD.
- For the remaining 20% of work, if your page is not fit for a particular dimension, use media query for that dimension only.
- Try to avoid device-specific hacks as well as the use of media queries.
- Give the size of each element (without using hacks and media queries) in such a way that your page should be visible in each dimension.
- Use HTML and CSS Validator Plug-in to validate your code.
- Make a minified version of CSS before deploying your code on production. Use CSS Compressor for making CSS minified.
- Avoid/stop the use of "important" in CSS.
It's not finished yet, but you can get at least a basic idea about how to implement Responsive Website Design (RWD).
I have attached one page (HTML File) with its CSS file. It produces Responsive Website Design (RWD). I have given most of the dimensions of elements in percentages (%). Even I haven't used any device-specific hacks or media queries.
Keep Exploring!
If you have any queries, please feel free to contact me.

Ajit SakharePosted Mar 16, 2017, 3:10 AM
Thanks for sharing Parth Dave
Mukesh KumarPosted Oct 21, 2015, 12:36 AM
Good Work, Great
Priyaranjan K SPosted Oct 20, 2015, 12:31 PM
Good One
Sibeesh VenuPosted Oct 19, 2015, 8:54 AM
Nice Share
Sanjay SabariyaPosted Oct 19, 2015, 6:08 AM
nice one.
Parth DavePosted Oct 19, 2015, 2:29 AM
Yes sure. I am giving you a link which gives you idea for Best Practices of HTML & Css. https://google.github.io/styleguide/htmlcssguide.xml?showone=Displaying_Hidden_Details_in_This_Guide#Displaying_Hidden_Details_in_This_Guide
Francis SusaimichaelPosted Oct 19, 2015, 2:13 AM
Thanks for sharing! In some places you are mentioning like "study for best practices", if you provided some more useful link may be helpful for readers on this! :)
Humayun Kabir MamunPosted Oct 19, 2015, 1:44 AM
Nice...
Mukesh KumarPosted Oct 19, 2015, 12:57 AM
Good One
Pratham DavePosted Oct 19, 2015, 12:42 AM
Nice Explanation....!
Ankit BansalPosted Oct 19, 2015, 12:42 AM
nice one..thanks for sharing with us..
Nilesh JadavPosted Oct 19, 2015, 12:15 AM
Good share !!
Harshad PansuriyaPosted Oct 19, 2015, 12:03 AM
Nice one
Abhishek MishraPosted Oct 18, 2015, 2:34 PM
Very Helpful.
Kamlesh BhorPosted Oct 18, 2015, 2:28 PM
Nice...