Sunday, 22 May 2016

Make header, navigation and footer full width in Blogger

How to make your header, navigation and footer full width in Blogger. The way your template is set up is to have margin, padding and max-width values to “construct” your layout. In order to make your header, navigation or footer full width we have to remove these and re-add them to just the main content (post area + sidebars). 

Please note that this is just to make the area wider, so you can apply CSS to the full screen. If you’re using a header image and the image is only 900 pixels in width, this tutorial won’t alter that. It will allow you to add a background colour using CSS to span the full width of the screen behind your image.

Before + After Example

Rollover/Hover-over the image to see a before and after example






 

Q. What are those values with the $ beforehand in my template?

Any code in your template that looks similar to $(example); is basically code that’s controlled by the Variables at the top of your CSS and is used by the Template Designer (Template > Edit > Customise). You can edit the default variable code or edit the main CSS area (changing from variable values to “real” values such as a colour or number) but if you remove the variable code then altering the related options in Template Designer won’t work so take care when doing so. More on this in a future tutorial.

How to make your header, navigation + footer full width

You can do this by editing the variable values as explained above which I plan to do a post on in the future, but we’ll stick to editing the main CSS as it’s easier to explain and understand. Please not that code shown below may look different in your template.
1. First we need to go to your main CSS area. Go to Template > Edit HTML and click the black arrow on the left beside the following code


<b:skin> ... </b:skin>
 
 
2. In between <b:skin> and </b:skin> search for body, it’s one of the first codes. You’ll see code similar to
body {
  font: $(body.font);
  color: $(body.text.color);
  background: $(body.background);
  padding: 0 $(content.shadow.spread) $(content.shadow.spread) $(content.shadow.spread);
  $(body.background.override)
}

Change the
 
padding: 0 $(content.shadow.spread) $(content.shadow.spread) $(content.shadow.spread);
to
 
padding: 0px;

3. Search for .content-inner. This is the section that wraps (combines) your header, navigations, posts, sidebar and footer. Search for it, skipping the variable section and find something that looks like
 
.content-inner { padding: $(content.padding) $(content.padding.horizontal); }

This is the code we talked about earlier. The $(content.padding) is defaulted to 10px and  
 $(content.padding.horizontal) is 40px as set in the variable section. We want to remove this 40px padding that’s on either side of our content so that the header won’t have spaces. Change it to look like
 
.content-inner { padding: $(content.padding) 0px; }

or if you prefer

 
.content-inner { padding: 10px 0px; }

4. Now look for the section of your template below </b:skin> that looks like
 
<b:template-skin> ... </b:template-skin>

5. In between <b:template-skin> and </b:template-skin> search for .content-outer, .content-fauxcolumn-outer, .region-inner and find something similar to

.content-outer, .content-fauxcolumn-outer, .region-inner {
        min-width: $(content.width);
        max-width: $(content.width);
        _width: $(content.width);
      }

Change
 
max-width: $(content.width);
to
max-width: 100%;

this will change our blog width to be the full size of the browser.
6. Find
 
]]> </b:template-skin>

and add the follow code above it to change the main content area (posts + sidebar) your blog width and centred.
 
.main-outer { max-width: $(content.width);  margin: 0 auto; }

or

 
.main-outer { max-width: 1000px;  margin: 0 auto; }

7. Again find </b:skin> and add the following above it

 
.tabs-inner { padding: 0px; } .section { margin: 0px; } .header-inner .widget {margin: 0px; }

8. Save the template and you should be able to see a full header, navigation and footer area now with your main content staying the same width as before. I’ve tested this in all default Blogger Templates and it works, a few templates need more/less editing that others.

Read More »

Saturday, 21 May 2016

How To Remove Extra Space From Blog Header





Note:- Before making any changes to blogger template it better to take a backup of existing template. This really helps if some thing goes wrong you can go back to current state.


Just take a look the blog and see how much extra space its showing.




Step 1:


- Login to your blogger account.
- Click on Template Link on left sidebar
- Click on ‘Customize’ button.





Step 2:

- Go to Advanced –> Add CSS. This will show the CSS window as well your blog below it. As soon as you add the CSS object it shows its impact live so that you will know how the blog will look after this change.



Step 3:

- Paste the below code in the ‘Add custom CSS’ box. Adjust the values based on your look and feel. I love to add comment so that you will know what you have customized if later point of time you need to look back and check.

/* Tech G lab - Removing Extra Space - Above Header Box*/
.content-inner 
{margin-top: -40px !important; 
}

/* Tech G lab - Removing Extra Space - Left and Right Margin*/
.header-inner 
{
margin-left: 0px !important;
margin-right:0px !important;
}

/*Tech G lab - Removing Extra Space - Header Top and Bottom Margin*/
.Header h1
{
margin-top: -20px !important;
margin-bottom:-20px !important;
}

/*Tech G lab - Removing Extra Space - Setting Padding*/
.header-inner .Header .titlewrapper 
{
padding: 0px 20px;
}

/*Tech G lab - Removing Extra Space - Around Description*/
.header-inner .Header .descriptionwrapper 
{
padding: 0 30px;
}

/*Tech G lab - Removing Extra Space - Around Description*/
.Header .description
{
margin:0 0 -10px 0;
padding:0 10px
}



Step 4:

- Once you feel the outcome is good, click on Apply to Blog button on top right corner.
Read More »

Thursday, 19 May 2016

Add a link to blogger widget titles



How to add a link to widget titles in Blogger:

All the widget titles in Blogger have no hyper links.But we can add link to widget titles in Blogger blogs.This will works good if you add link to follows gadget like Google+ Followers gadget.With this posts we can put link in Google+ Followers widget title.

Follow below steps to add a link to widget titles in Blogger blog

Step 1 : Go to Blogger Dashboard

Step 2 : Click on Template


Step 3 : Click on Edit HTML


Step 4 : Search below code

<b:widget id='PlusFollowers1' locked='false' title='Google+ Followers' type='PlusFollowers'>
    <b:includable id='main'>
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>


Replace last line of the above code with below like

<h2 class='title'><a href=" your custom url link"><data:title/></a> </h2>

Put link in the pace of your custom url link in the above code.

Step 5 : Click on Save template.


After adding link to your Google+ Followers gadget title , when you click on title then it will goes to the link added in the above code.
Read More »

Wednesday, 18 May 2016

Social media fa-fa icons for footer of the blogger



Style :



Note :If you have  already added font-awesome-icons link to your template then skip step 1 . follow from step 2


Step 1: Login to Blogger Dashboard  , Go to Template > Edit HTML





Click any ware in the template and press CTRL+F then find <head> tag just below to it add below code 

<link href='http://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css' rel='stylesheet'/>


Click on save template button to save the changes 

Step2: Go to layout  > Click on add gadget > select Html/Java script . > add below code in content area then drag it to place where you want on the site 






<style>
#fawesomeicons {
    margin: 0;
    padding: 0;
}

#fawesomeicons ul {
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
}

#fawesomeicons li {
    list-style: none;
    margin: 0;
    padding: 0;
        

}
#fawesomeicons li a, #fawesomeicons li a:link, #fawesomeicons li a:visited {
    color: #FFF;
    display: block;
   font:normal 18px Tahoma, Geneva, sans-serif;    margin: 0;
    padding: 9px 12px 10px 12px;
        text-decoration: none;
}

#fawesomeicons li a:hover, #fawesomeicons li a:active {
    background: red; /* Menu hover */
    color: #FFF;
    display: block;
    text-decoration: none;
        margin: 0;
    padding: 9px 12px 10px 12px;       
}

#fawesomeicons li {
    float: left;
    padding: 0;
}

</style>

<div id=fawesomeicons>
<ul id=fawesomeicons>
<li><a href='#' rel='nofollow' target='_blank' title='Facebook'><i class='fa fa-facebook'/></i></a></li>
         <li><a href='#' rel='nofollow' target='_blank' title='Twitter'><i class='fa fa-twitter'/></i></a></li>
       
         <li><a href='#' rel='nofollow' target='_blank' title='GooglePlus'><i class='fa fa-google-plus'/></i></a></li>
<li><a href='#'><i class='fa fa-user'/> About Us</i></a></li>
<li><a href='#'><i class='fa fa-envelope'/> Contact Us</i></a></li> </ul>
 </div>



Note: 

  • Replace # tags with your links 
  • If you want change color of the icons change the color code :(FFF) in green color
  • If you want to change font size , change the size where (18) in red color
  • If you want hover back ground color change the color code :(red) in brown color


Read More »

Tuesday, 17 May 2016

How to list recent post titles by label with thumbnails

Sometimes we want to have everything organized, so that our readers can find topics of interest more easily. To accomplish this, instead of putting a widget with the latest posts, we can put together the latest entries sorted by category, so that we'll be able to show the latest posts for each label we want and also display a thumbnail for our category.





To add this recent posts widget for labels or categories in a Blogger blog, follow the next steps:

Recent Posts with Thumbnails Sorted by Labels


Step1: Go to Blogger Dashboard >  'Template' and click the 'Edit HTML' button



Step2: Click anywhere inside the code area and search (CTRL + F) for this piece of code:

]]></b:skin>

Just above ]]></b:skin>    , paste this below CSS style :  






/* Recent posts by labels
--------------------------------- */
img.label_thumb{
float:left;
margin-right:10px !important;
height:65px; /* Thumbnail height */
width:65px; /* Thumbnail width */
border: 1px solid #fff;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
-moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
box-shadow: 0 1px 1px rgba(0, 0, 0, .4);
}

#label_with_thumbs {
float: left;
width: 100%;
min-height: 70px;
margin: 0px 10px 2px 0px;
padding: 0;
}
ul#label_with_thumbs li {
padding:8px 0;
min-height:65px;
margin-bottom:0px;
border-bottom: 1px dotted #999999;
}

#label_with_thumbs li{
list-style: none ;
padding-left:0px !important;
}

#label_with_thumbs a { text-transform: uppercase;}
#label_with_thumbs strong {padding-left:0px; }

 Step 3: Now try to find this tag:

</head>

... just above </head>  add this script:




<script type='text/javascript'>
//<![CDATA[
function labelthumbs(json){document.write('<ul id="label_with_thumbs">');for(var i=0;i<numposts;i++){var entry=json.feed.entry[i];var posttitle=entry.title.$t;var posturl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='replies'&&entry.link[k].type=='text/html'){var commenttext=entry.link[k].title;var commenturl=entry.link[k].href;}
if(entry.link[k].rel=='alternate'){posturl=entry.link[k].href;break;}}var thumburl;try{thumburl=entry.media$thumbnail.url;}catch(error)
{s=entry.content.$t;a=s.indexOf("<img");b=s.indexOf("src=\"",a);c=s.indexOf("\"",b+5);d=s.substr(b+5,c-b-5);if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!="")){thumburl=d;}else thumburl='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgyEH2K_jylVpJHVHdumshPmZt4dqMt_IbHK9QEdgSzU3Pwmf8kFaA0qd-U5iyVf4pJaHmRwrjaztu8dLxBCjaB1w38IJnlBEMi9q7kXOedlOM3ucsMYfxZC3-k5XMRLZ3kgz4wQyR2lU/s1600/picture_not_available.png';}
var postdate=entry.published.$t;var cdyear=postdate.substring(0,4);var cdmonth=postdate.substring(5,7);var cdday=postdate.substring(8,10);var monthnames=new Array();monthnames[1]="Jan";monthnames[2]="Feb";monthnames[3]="Mar";monthnames[4]="Apr";monthnames[5]="May";monthnames[6]="June";monthnames[7]="July";monthnames[8]="Aug";monthnames[9]="Sept";monthnames[10]="Oct";monthnames[11]="Nov";monthnames[12]="Dec";document.write('<li class="clearfix">');if(showpostthumbnails==true)
document.write('<a href="'+posturl+'" target ="_top"><img class="label_thumb" src="'+thumburl+'"/></a>');document.write('<strong><a href="'+posturl+'" target ="_top">'+posttitle+'</a></strong><br>');if("content"in entry){var postcontent=entry.content.$t;}
else
if("summary"in entry){var postcontent=entry.summary.$t;}
else var postcontent="";var re=/<\S[^>]*>/g;postcontent=postcontent.replace(re,"");if(showpostsummary==true){if(postcontent.length<numchars){document.write('');document.write(postcontent);document.write('');}
else{document.write('');postcontent=postcontent.substring(0,numchars);var quoteEnd=postcontent.lastIndexOf(" ");postcontent=postcontent.substring(0,quoteEnd);document.write(postcontent+'...');document.write('');}}
var towrite='';var flag=0;document.write('<br>');if(showpostdate==true){towrite=towrite+monthnames[parseInt(cdmonth,10)]+'-'+cdday+' - '+cdyear;flag=1;}
if(showcommentnum==true)
{if(flag==1){towrite=towrite+' | ';}
if(commenttext=='1 Comments')commenttext='1 Comment';if(commenttext=='0 Comments')commenttext='No Comments';commenttext='<a href="'+commenturl+'" target ="_top">'+commenttext+'</a>';towrite=towrite+commenttext;flag=1;;}
if(displaymore==true)
{if(flag==1)towrite=towrite+' | ';towrite=towrite+'<a href="'+posturl+'" class="url" target ="_top">More »</a>';flag=1;;}
document.write(towrite);document.write('</li>');if(displayseparator==true)
if(i!=(numposts-1))
document.write('');}document.write('</ul>');}
//]]>
</script>

Note: to add your own pic for the posts with no thumbnail, replace the image url in blue with your own


Update: For a better image resolution add this script above the </body> tag:




<script type='text/javascript'>
function changeThumbSize(id,size){
var blogGadget = document.getElementById(id);
var replacement = blogGadget.innerHTML;
blogGadget.innerHTML = replacement.replace(/s72-c/g,"s"+size+"-c");
var thumbnails = blogGadget.getElementsByTagName("img");
for(var i=0;i&lt;thumbnails.length;i++){
thumbnails[i].width = size;
thumbnails[i].height = size;
}
}
changeThumbSize("label_with_thumbs",210);
</script>



Now Save the template to finish with your changes.


So, what we have added, is the CSS to style the widget and the script to make it work. Now all we have to do is to add the widget's code to the blog sidebar in a HTML/JavaScript gadget:

 Step 4: Go to Layout - click on Add a Gadget



Step 5:  From the pop-up window, choose the HTML/Javascript widget and paste this script inside the empty box:


<script type='text/javascript'>var numposts = 3;var showpostthumbnails = true;var displaymore = false;var displayseparator = true;var showcommentnum = false;var showpostdate = false;var showpostsummary = true;var numchars = 100;</script>
<script type="text/javascript" src="/feeds/posts/default/-/Name-of-the-label?published&alt=json-in-script&callback=labelthumbs"></script>

Where it says Name-of-the-label should be the name of the label that you want to display, and if your label is case sensitive, like in my example, then you should type it that way.



Within the last code, there are these parts which can be customized - change true with false or vise versa


var numposts ← Number of posts to display
var showpostthumbnails ← Show/hide thumbnails
var displaymore ← Show or hide the read more link
var displayseparator ← Show/hide separator
var showcommentnum ← Show/hide the number of comments
var showpostdate ← Show/hide the posts dates
var showpostsummary ← Show or not the posts summaries
var numchars ← Number of posts characters (here you have to change the 100 value)



Remember that the gadget displays the latest posts from a particular label... therefore, if you want to display the latest posts from other labels, repeat step 5 for each additional category that you want to add.

To list recent post titles by label with out  thumbnails: Check This 
Read More »

Sunday, 15 May 2016

7 Essential On-Page SEO Techniques in 2016

SEO (Search engine optimization) is the essential thing to get traffic from search engines and it usually divides into two parts, off-page and on-page.
Off-page refers all things when we do off for our site, such as social media sharinglink building etc.
On-page refers all things which we do on for our site. In this post, we will specially discuss about the on-page SEO in 2016. In this part of SEO, we work on the target keyword to optimize for search engines and we want to, that keyword get high rank in SERPs and we apply certain techniques such as optimizing title, meta description, keywords placement, writing high-quality content and many other factors. This most important technique to get massive traffic from search engines which are necessary for the establishment of a successful blog or website.



Top 7 on-page SEO techniques in 2016

In the below I provided some essential on-page techniques in 2016, which is more important to increase your blog or website visibility in search engines such as Google, Yahoo, Bing etc.

1. Optimize your post titles

Titles are a very important factor for your site and the first thing which search engines pull into search results. So, this important to make your post titles meaningful and interesting and use your main keyword in the title. A better title not only attracts the visitors as well as search engines also.

2. Optimize your permalinks

Your post URLs structure is also an important thing in on-page SEO. You also need to make your post URLs, search engines friendly. Use your target keywords in post URL instead of using the symbols, brackets, comma, and other special characters. To separate two strings, use only dishes and make sure to create a pretty URL for your post. For example, you are writing an article about ” health benefits of apple” your article URL’s structure should have like this
 www.domine.com/heath-benefits-of-apple/ instead of
www.yourdomain.com/?page_id=45/

3. Optimize your images

Images are not only making you contains pretty, but it can generate some extra traffic for your site. It depends on how much you have optimized your images correctly. In the below some tips to make your images search engines friendly.
Name and Title, use your target keywords in image name and differentiate two keywords with dishes. For example, you are writing a post about “health benefits of apple” your image title should have such as “health-benefits-apple” instead of using the default image name.
Use ALT tag, this tag tells about your images to search engines, so you should use ALT tags with your post images.
Compressed your images, don’t use the large file images in your posts because it increases the site loading time which is harmful for the site. Use only compressed smaller file size images in your site.

4. Use of heading tags.

Correctly use of heading tags is a truly important factor in SEO. When you are writing an article, divide it into smaller sections and paragraphs and should use different heading tags such as h1, h2, h3 to highlight different headlines. An H1 tag is used only for the post title and use other heading tags like h2, h3 in the post body but don’t use these so many time in a post as it looks like as negative SEO practice.

5. Meta description

Meta description is the short summary of your post. It usually appears in the search results along with your post title. Visitors can get a quick idea about a post, what is your web page about. You should write a Meta description for every post and use your main keywords again here and limit your description to 150 characters including space. A pretty Meta description can in increase the CTR and can gain more traffic from search engines.

6. Keywords density

Using your targeted keywords in throughout in your post body is also important, but keyword stuffing is avoided because in these days Google makes their policy restricted about keywords stuffing and they usually penalized the keyword stuffing sites. So, keep your target keyword up to 2-3% in your contains only.

7. Internal Linking

Including the internal links in your contains is another recommended factor in on-page SEO. Google is not only counting the site external links, but also give importance to internal links also. The other hand internal links will help your site visitors to spend more time on your site. In the result, your site page preview will increase and reduce the bounce rate. So, you should link out to related posts from your site.
So, friends this some essential factors to improve your on-page SEO 2016. After the implement these things on your site, you will obviously able to get more traffic to your site. Feel free and share your thoughts with us in the comment section.
Read More »