Responsive Designs becomes a part of professional web designing in these days. Even Your website or blog everyone prefers responsive web design. Many of big blogs are now using responsive web design instead of different Mobile versions. Responsive design also reduce loads and even a SEO friendly. But the main question is we can design website template as responsive but can we design Blogger based template as a responsive? Yes you can. Blogger becomes a big CMS platform for blogs development. Even blogger have many great features as compare to WordPress. Template designing is much easier in blogger as compare to WordPress. But we always think that blog theme are not such professionals like WordPress theme but I don’t think so. For attractive theme designing we need HTML, CSS, JS, jQuery, Ajax like few designing languages which are enough to design an attractive theme and these are compatible with Blogger.
A blogger template is made responsive by using special CSS rule which is called @media query. It works like conditional tags in blogger and If Else statements in JavaScript.
The value which we will use in this @media query is "screen" which will determine and adjust the design layout according to screen widths on different type of devices.
Let’s understand it. As I said above we use this query like conditional tags and adjust the design layout according to screen width using @media query. It means we will set a screen width value in our @media query and then use our desired CSS syntaxes to adjust width, positioning, size and other values of our HTML elements.
Now we proceed to learn their usage for making a responsive blogger template.
Before using CSS @media query in our blog, we have to insert a following Meta tag in the head section of our blogger template.
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
To add it in your template go to blogger dashboard> Template > Edit HTML. Click anywhere inside the template HTML editor and press CTRL+F. Now search for <head> tag and just below it paste the above tag. It makes @media query functional to adjust the layout as the screen width changes. To add them in your template, search for ]]></b:skin> tag in template and paste following example codes just above this tag.
@media screen and (max-width : 1280px)
{ /* CSS FOR NET-BOOK AND DESKTOP */ }
@media screen and (max-width : 1024px)
{ /* CSS FOR TABLETS */ }
@media screen and (max-width : 768px)
{ /* CSS FOR SMALL TABLETS */ }
@media screen and (max-width : 640px)
{ /* CSS FOR IPHONE */ }
@media screen and (max-width : 480px)
{ /* CSS FOR SMARTPHONES */ }
@media screen and (max-width : 320px)
{ /* CSS FOR SMALL OLD MOBILES */ }
Replace the example text inside /* with the CSS rules you want to use for the above device types according to their screen widths.
In the above queries, max-width is used to specify the screen width up to which the CSS codes will work. In the above example we have set max-widths for nearly all type of devices. By using separate coding for each class of devices, we make sure that they don't interfere each other and responsive design works properly on each device.
If this article has become knowledgeable and helpful to you then don’t forget to comment below and share this on social media. Thank You!
0 comments:
Post a Comment