The entire page width expands and the sidebar wrapper which contains all widgets disappears. You will find these static pages and post sections looking like a plain Static HTML webpage with no labels, Author description, Icons and widgets. All that you see is a wide layout with some text and title. This is achieved by overwriting the Stylesheet with custom styles using conditional XML tags to remove certain sections of the blog layout. Sections that can be removed include your blog header, post body, sidebar, footer and what not! Today you will learn an easy way to achieve this and turn your featured pages and posts into a Website Look and not a weblog.
Live Demo
If you wish to hide individual widget sections and not an entire sidebar then read:
How it works?
Different layouts are designed with different CSS classes and IDs. You can remove any style from a HTML div section by using the property of display:none. In most blogger templates following are the Style IDs & classes that are responsible for the appearance of important sections on your blog:
#header Styles the Header
#sidebar-wrapper Styles the Sidebar
.post-title Styles the Title of a post or static page
.post Styles the Post-body
.post-header , .post-header-line-1, .post-header-line-2 Styles all elements that appear below post title
#main-wrapper Styles the section which contains post-body#comments Styles the Comment section and comment form
.blog-pager Styles the Never, Older, Home links (Page Navigation)
#footer Styles the Bottom section of the blog
.post-author Styles the text "Posted by Mohammad..."
.post-icons Styles the Edit Icon
.post-labels Styles the Label links
To hide a section we will use a conditional if-statement that will disable the ID on a specified URL only.
What if in case your template had different classes or IDs?
In that case to identify the ID or class name simply right click that section and click "Inspect element" in Firefox or chrome. Then you will easily identify the class name or Id by viewing the source file.
Tip: You can even test the section by inserting display:none right from your browser inside that CSS code to see if the section is removed. For example if I click the sidebar section of MBT and then insert display:none inside sidebar-wrapper , it will hide all widgets. See below:
CSS View:
HTML View:
It can't me more simpler. You can ask for any help if needed.
Steps To Increase Page Layout:
The entire process involves simple steps. Follow these instructions:
- Go To Blogger > Settings > Template
- Backup your template
- Click Edit HTML > Proceed
- Search for ]]></b:skin>
- Just below it paste the following code:
<b:if cond='data:blog.url == "URL-OF-PAGE-OR-POST"'>
<style>
#sidebar-wrapper.blog-pager, .post-header-line-1, .post-footer{ display:none !important;}
#main-wrapper { width:99%!important;}
.post { width:99%!important; }
</style>
</b:if>
- Just replace URL-OF-PAGE-OR-POST with the complete URL/link of the page or post where you want a wide layout with no sidebar and footer. A URL should start with http://
- You can change the width width:99% even in pixels like 960px or lower.
Tips:
If you also don't want to display the title of the page then add the following code just above
</style>
.post-title {display:none!important;}
Repeat the same process for any section you wish to hide. If you want to hide the post labels, Edit Icon or author description, you can also add them in one line by separating each class with a comma. Like this:
.post-labels, post-icons, post-author {display:none!important;}
6. Save your template and all done!
Visit the new page and see if things are as you planned. :)
Need Help?
In coming tutorials we will share how to embedded php in your Blogger layout. This can be clearly seen if you visit MBT's contact page. The page is a result of conversion of a XML file into simple HTML file. I will share in coming days how to easily achieve this. Again things will be pretty unique and fun to be tried.
If you have any questions related to the tutorial above then please post your queries in the comment box below and make sure to share the page URL you wish to style. Would be a pleasure helping you. Take good care of yourselves and those around. Peace pals! :)