Skip to main content

How to Externalize Your Blogger Stylesheet?

Do you want your blog to load much faster than it does now? In that case, you can go for external CSS stylesheets. In this tutorial, we will deal with externalizing the stylesheet on Google's Blogger platform. I have been working on putting the stylesheet on my blogs on an external server for some time. Here is the tutorial for you.

Blogger Template Stylesheet


For analysis, let’s look at this blog: RedBugle (redbugle.blogspot.com). The basic design of the blog is this right now:

redbugle.blogspot.com

I have used the Awesome Inc., template of Blogger as you can see. The goal is to achieve the same look and effect after externalizing the blog’s stylesheet. By the way, CSS (Cascading Style Sheet) is a part of the HTML markup that contains the information as to how the blog displays on different user agents (browsers). In Blogger, the entire stylesheet that you can customize and change according to the need is contained in between these two tags: '<b:skin><![CDATA[' and ']]></b:skin>'. So your first task is to find these tags. Look at the image below:

stylesheet code on blogger

The stylesheet includes the ‘/*’ that comes right after CDATA[.

Several bloggers and technicians out there have been advising to cut the data in between these tags (<b:skin><![CDATA[ and ]]></b:skin>) and paste it into an external file to create the stylesheet. Say, you followed that advice, then your blog will look like this (we will come to hosting and other stuff later).

blog without css loaded

As you can see, the blog has no design whatsoever. The external stylesheet simply didn’t work.

The actual stylesheet of Blogger is not between <b:skin> tags. What goes in between these tags is just a precompiled version of the CSS that has some Blogger specific code.
Why did this happen? Because the actual stylesheet of Blogger is not between <b:skin> tags. What goes in between these tags is just a precompiled version of the CSS that has some Blogger specific code. You can get the actual stylesheet only from the page rendered on a browser, from the HTML source code. Go to your browser, and get to the source code of the blog. You will find <style> </style> element in here. What goes in between these is the actual CSS stylesheet that you need to use. Copy this code.

Now, create a text file on your desktop and name it whatever you want. Just put the extension of the file as ‘css’ instead of ‘txt’. (You can see extensions of files by going to Control Panel->Folder Options->Uncheck ‘Hide extensions of known file types’). Paste the entire CSS code into this text file and save it.

Hosting the CSS File


In order to host the CSS file, you can either use your hosting service provider (if you have one), or you can get it hosted for free with Google Sites or a cloud storage service like Dropbox.

1. Google Sites


If you are using Google Sites, just sign into the service and create a website. Click on ‘more’ on the top from within your site, and click on ‘Manage site’. Here, click on ‘Attachments’ and you will see the upload button. Upload your CSS file into this hosting server.

google sites manage option

Now, just right-click on ‘Download’ and get the public link of the CSS file. This is the one you are going to use for the external call.

2. Using Dropbox


If you are using Dropbox, just download the application and set it up. Sign up on Dropbox, and enable syncing of the Public folder (this will be automatically created by Dropbox). Just copy and paste your CSS file into this folder and it will be automatically synced with Dropbox server in a few moments.

From the Public folder, right-click the CSS file and from the Dropbox menu, get the public link of the file. This is the URI of the CSS that we are going to use with the blog.

Putting Stylesheet Into the Blog


As a first step now, just delete everything between the <b:skin><![CDATA[ and ]]></b:skin> tags. Find the closing of the head tag; search for </head>. You need to add a link tag over here. The link element you are adding here is the one used to call an external stylesheet. The completed code looks like this:

<link rel=”Stylesheet” href=”StyleSheetFile.css” type=”text/css” media=”all”/>
</head>

‘StyleSheetFile.css’ should be replaced with the actual link to your CSS file. Save the template.

There you go! Now, just check the blog in all browsers and see if the CSS is showing up properly. The external CSS file will increase the blog load time for subsequent page views, as the CSS file gets cached once it has been loaded into the browser.

Popular posts from this blog

A Tablet Running Both Windows and Android Side By Side

The latest innovation from Samsung is the ATIV Q tablet, a streamlined 13-inch tablet that is extremely powerful and not that chunky for a tight competitor to the likes of Microsoft Surface Pro. It is thin, extremely powerful, and has a large brilliant QHD resolution screen, which is higher than Full HD. QHD is 3200x1800 pixels, while FHD is 1920x1280 pixels. Let’s take a brief look at this device. Technical Specifications The tablet-laptop mash-up is not yet in the market. We may update this post as it is made available in the market. Here are the brief technical specifications of the tablet. Display 13.3 inch; 3200x1800 px (the highest in the market); 16 million colors Processor Intel Haswell Core i5 processor (details unknown) RAM 4 GB Graphics Intel HD 4000 Storage 128 GB SSD Battery life 9 hours of usage Operating system(s) Android 4.2.2 Jelly Bean; Windows 8 ...

10 Worst Android Antivirus Apps You Can Get

Are you careful about the security of your smartphone? For your Android device, Google Play store offers a number of antivirus apps. There are paid and free apps from professional companies like Avast!, Kaspersky, and Lookout, as well as free antivirus apps that install and work relatively faster. Among the security apps found on the Play Store, there are a number of free, lightweight ones, most of which enjoy a great number of downloads and high ratings. Most of the ratings are done by people who find the interface easy to use, but have no idea whether the app actually works or not. Many of us feel the app is great if the interface is cool, don’t we? It is painful to note that most of these free apps not only fail at most antivirus tests, but experts regard them to be incapable of detecting any threat. Last year, the latest mobile antivirus test report was published by AV-Test.org , in which they tested and rated the best and the worst antivirus programs among multiple platforms. ...

Why Apple’s Retina Display No Longer Matters?

Apple trademarked Retina Display in Nov, 2012. Retina Display is one of the major attractions of Apple’s top products. Introduced with the iPhone 4, during Steve Jobs’s reign, it sure sold quite a number of iPhones in two years. At this time, however, is Retina Display still relevant? Should Apple be actively marketing this feature at all? Let’s see. What Exactly Is It? Retina Display or any display at that matter has a particular ppi ratio (Pixels Per Inch). [ Learn about pixels ]. If, on a display panel, there are more than a fixed number of pixels in every inch, that display will be rich enough to avoid the pixelation issue given by older, low pixel-density devices. If you can see individual pixels, such a display looks rather dull. Look at this image below. One of half of the Apple logo is pixelated, and you can see the difference. Creating too many pixels and cramming them up within a display is a very expensive job. This is the reason why mainstream smartphone manufacture...