Centre Align Page Elements 2014


Centre Align Page Elements 2014,Align Page Elements 2014,Centre Align Page Elements,Align Page Elements,Left Align Page Elements,Right Page Align Elements,Elements Of  Align Paging,
A number of queries we received had to do with alignment problems. In some templates, the links, text, widgets and other page elements are aligned to the left. Many bloggers prefer to have widgets in the center of the sidebar or post body. There are a couple of ways to align the page elements within the sidebar or the blog posts. In this tutorial, you will learn how to center align all or selected page elements in your blog.

Header Alignment:
If you are looking to center align the Header Title, Description and Header image, look up our other guides - Header Image and Title Alignment (I) for Minima, Denim, Rounders, Herbert, Jellyfish, Harbor and Scribe templates; and Header Image and Title Alignment (II) for the Dots, No. 897, No. 565, Thisaway, Moto, Snapshot, TicTac, Tekka, Sand Dollar and Simple II templates.

Center align all the elements:
The general alignment codes are found in the stylesheet. Go to Template -> Edit HTML. If you want the elements in the sidebar to be in the center, try looking for this and insert the alignment code (shown in red):-
#sidebar-wrapper{
text-align:center;
}


In different templates, the CSS classes are named differently. Hence, if you can't find the above, look for any of these and insert the code:-

#sidebar
#sidebar-wrap
#side
.sidebar


Do not save the template. Preview the Template. The text and elements in the sidebar should be in the center and not aligned to the left.

Centre Align Page Elements 2014

In the same way, if you want the elements in the main post body to be in the center, add the code here:-


#main-wrapper{
text-align:center;
}


If you don't see this in your template, try inserting the code under any of these or words to that effect and preview the template.

#main
#main-wrap
.main


Centre Align Page Elements 2014

To center align the Footer elements, the code can be inserted under any of these:-


#footer
.footer


Center align one element

Suppose you want only one element to be aligned in the center. After you have created that element, be it a picture or widget or text, go to Template -> Edit HTML and scroll to somewhere near the bottom. Look for the widget ID. For example, if we have added a HTML code, a link list and a labels widget in the sidebar, we will see this:-



The highlighted text are the widget IDs. Scroll further up the template and insert after a } character the alignment code like this:-

#HTML1{
text-align:center;
}


Replace the part in green with the relevant ID. This will center align only that particular page element.

DIV alignment tags

The other way to align an element is to insert the DIV alignment tags. Let's say you have created a HTML page element to insert a widget, image links, stat counter, etc. Insert these tags before and after the HTML Code to align that element in the center.

HTML Code of widget



Center align element in Blog Post

You may center align a picture, code, table, link or text within a blog post. Just block the part you want to put in the center and click the center-align icon in the Post Editor:-

Centre Align Page Elements 2014

Alternatively, you can switch from the “Compose” mode to the “Edit HTML” mode. Insert these tags and what goes in between will be in the center.


TEXT TO BE CENTERED


About Unknown

Hi there! I am Hung Duy and I am a true enthusiast in the areas of SEO and web design. In my personal life I spend time on photography, mountain climbing, snorkeling and dirt bike riding.
«
Next
Newer Post
»
Previous
Older Post

No comments:

Leave a Reply

.