Friday, 3 February 2012

Code snippet align Pages PageList gadget in blogger

pagelist left A Pages (a.k.a PageList) gadget is simply a set of links to your (static) Pages. You can opt to add Pages gadget once a static page is published.
Pages gadget is left aligned by default. To align it in the center or on the right (of your horizontal bar or sidebar), you just need to add a small CSS code snippet.
Here we go,
  1. Go to Dashboard > Design > Edit HTML Template Designer > Advanced > Add CSS.
  2. Look for ]]></b:skin> line in your HTML code and add the following code right before the line.
    Paste one of the following snippets in the CSS editor, and press Enter key.

    a. For horizontal tabs type PageList

    • To center
      1.PageList {text-align:center !important;}
      2.PageList li {display:inline !important; float:none !important;}
      pagelist center
    • To align right
      1.PageList {text-align:right !important;}
      2.PageList li {display:inline !important; float:none !important;}
      pagelist right
    If the tabs stack on each other after you added the code, try replacing display:inline with display:inline-block.

    b. For sidebar links type PageList

  3. Check out the live preview in the lower pane.
  4. Lastly, if you are happy with the way it looks, click the orange Apply To Blog button.
  5. That's it. Enjoy!

No comments:

Post a Comment