After a lot of reading up on HTML and CSS I realised that these posts appeared within a section with an associated style name, in this case a class. In turn I could add an entry to the HTML template for my blog to define a shift to the right for this particular class style so that it would display properly. And this shift would only be applied to this section of the blog page and no other.
What this boils down to is the following:
- The "Popular Posts" widget reference in the HTML has an attribute of "
id='PopularPosts1'
" - The list of posts within this widget has two class attributes, one of which is "
popular-posts
" - I could shift the list of posts far enough across to the right using the style property of "
padding-left
"
- In Blogger click on "Template" on the left hand side of your blog dashboard (under Layout and above Settings)
- Click the on "Edit HTML" button under the small image of your blog
- Expand the "
" section near the top by clicking on it or on the right pointing triangle on the left hand side<b:skin></b:skin>
- This was at line 7 on my template
- Scroll down to the end of this section, which finishes with
]]></b:skin>
- Above this on their own lines add the following:
#PopularPosts1 .popular-posts { padding-left: 15px }
- Then click on the "Save Template" button at the top of the screen
- If you now redisplay your blog you should see the "Popular Posts" list has now been shifted over to the right and aligned nicely under the "Popular Posts" heading
- The first line states that this style is only to be used within a "popular-posts" class element that itself occurs within a "PopularPosts1" ID element.
- This should match exactly the content section we want to be shifted across in the blog page
- The second line sets the left hand side padding before the displayed content to be "
15px
" (pixels)- The value of "
15px
" was obtained by simple trial and error starting with smaller values until the list was shifted over enough.
- The value of "
No comments:
Post a Comment