Responsive Web Development |
Also, read: 5 Tips To Make Your Blog Load 10x Faster | Blogging Tips
Responsive Web Development - Multiple Screens, ONE DESIGN
Your site design is good for desktop but some of your's, it gets failed when it comes to the small screen. Here is advanced tutorial described for making the responsive blogger HTML template compared to old fixed layout template in which you can not only able to configure the widgets to show an alternate content for the mobile view but also you will able to customize the full mobile friendly template, place AdSense ad units only for mobile template too.Check: Improve Search Engine Ranking [PageRank] by Generating HTML Meta Tags
Responsive Web Design in HTML5
All new website are now built in HTML5. But by-default the blogger have provided only 7 templates which you can NOT edit as per your requirement or it may cause different look than the one you are on now. Also there are lots of sites can provide free mobile template for your blog, even though they built a nice template for your site, they have some drawbacks like you cannot place AdSense ad widget, they gonna place their banner in your template more over some sites places ads and earn money from your mobile visitors. The main disadvantage of this site according to me is that it makes your site links differently than original, so social sharing state varies.Building Responsive Website
Flexible or responsive template means one design which is automatically redesign itself according to the screen size. Consider following advantages of this tutorial to build a responsive website;- Forget about maintaining separate website for mobile
- It�s good in case of SEO.
- Your site links are remained same so it doesn't cause any affect in social sharing statistics.
- Browser�s user agent doesn't cause effect on the design.
Get started
- First go to Template >> Choose Mobile template >> Select Custom.
- Save
Screen Detection
- Go to Template >> Edit HTML
- Add following code below <head> tag
<meta content='width=device-width, initial-scale=1.0' name='viewport'/>
This Meta viewport is used for detecting the screen size then fed it to CSS for redesign accordingly. CSS - Designing Web Sites
We need to load CSS property for <body> according to screen-view:Find <body> and replace it by following code:
<body expr:class='"loading" + data:blog.mobileClass'>
Widget Customization
Now we can allow particular widgets to be shown on mobile view. How?Normally in HTML widget it defined as:
<b:widget id='ID-type' locked='true' title='Widget-Title'/>
Here you just need to add mobile tag to it<b:widget id='ID-type' locked='true' mobile='yes' title='Widget-Title'/>
This mobile property tag will cause that widget to be shown in mobile view.Mobile Property Tags | Meaning |
---|---|
mobile=�yes� | show in mobile-view |
mobile='no' | don�t show in mobile-view |
mobile='only' | show in only mobile-view |
CSS Customization
Now actual hard work is started now. If you know CSS editing well then you can you following class to design you mobile template..mobile #sidebar-wrapper { Display: none; } | This class will not allow sidebar to be shown in mobile view. |
Advanced conditional CSS Customization
Learn to make web design according to screen-size conditions.@media screen and (max-width : 320px) { #sidebar-wrapper { Display: none; } | This class will not allow sidebar to be shown in mobile view if screen-size is less than 320px like for smartphones. |
@media screen and (max-width : 768px) { /* CSS for big size screens like tablets */ } | This class will load the CSS you have defined in it when screen size is less than 768px like tablets. |
You need to read for full detailed CSS tutorial: How to Build Responsive Blogger Template CSS : Advanced Tutorial
HTML Customization
Now we also make changes in HTML simultaneously. For this you just need to know following mobile condition<b:if cond="data:blog.isMobile">
<!-- Show this for mobile-vew-->
<b:else/>
<!-- Show this if it�s not mobile screen or for desktop view -->
</b:if>
<!-- Show this for mobile-vew-->
<b:else/>
<!-- Show this if it�s not mobile screen or for desktop view -->
</b:if>
What you learn
A Responsive template is also important as your current template playing a role for visitors. It makes considerably change in your bounce rate. We really need to be aware and have to grab a good position in the market. For responsive website samples check this page on mobile and desktop, you will get what you are learning and what you need to do with mobile web site design.What Next
In next tutorial we are actually going to edit complete CSS and HTML of blogger template and will see how to develop it according to the screen-view.Stay addicted.
EmoticonEmoticon