Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Want to place icon in Sidebar (http://forum.bytesforall.com/showthread.php?t=201)

HalfWayThere Feb 5, 2009 05:31 PM

Want to place icon in Sidebar
 
Hi

Maybe I am doing something stupid here, but I am trying to insert a small image (called home2_icon.gif) in the left hand sidebar to the left of the link called "Home/Latest Post".

I have tried many different ways to get this to work, without success ...

(I know the image is rather small - that isn't the issue, as I plan to resize this once I have got the coding correct),

Thanks in advance. :-)

Flynn Feb 5, 2009 05:45 PM

Put this into HTML/CSS Inserts -> CSS Inserts:

HTML Code:

.home-icon {
    background: transparent url(/wp-content/themes/atahualpa3/images/home2_icon.gif) no-repeat scroll 0;
    height: 22px;
    line-height: 22px;
    padding-left: 25px;
    display: block;
    text-decoration: none;
    white-space: nowrap;
    }

Change the image path in url(......home2_icon.gif) if the image is located elsewhere.
Change height and line-height values to the height of the image.
Change padding-left to the width of the image + desired distance between image and link.

and change the link in the text widget to, i.e.:
HTML Code:

<a class="home-icon" href="/" title="Matters Today Home">Home Page/Latest Post</a>
To put space between all three image/link combis put this at the bottom of CSS Inserts:

HTML Code:

.posts-icon,
.comments-icon,
.home-icon {
margin-top: 5px;
}


HalfWayThere Feb 7, 2009 11:30 AM

Thanks - you are a star. I have managed to get things just as I wanted. :)


All times are GMT -6. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.