WordPress.org

Forums

image links in text widget don't work (7 posts)

  1. carey baldwin1
    Member
    Posted 8 months ago #

    I have a text widget in a side bar and have buttons (images) that I want to link to another page within the website. I can't find an error in the code. The buttons show but the links are not active. This is the code I am using within the text widget:

    <div style="float:left;width:170px;margin-right:35px;">
    <img src="http://www.careybaldwin.com/wp-content/uploads/2012/05/Judgment-cover.jpg" style="height:250px;width:167px;border:solid 1px #870202;" />

    <p>JUDGMENT</p>
    <p style="font-size:20px;">If these two rivals can't work together...one of them is going to die.</p><p>
    <img src="http://www.careybaldwin.com/wp-content/uploads/2014/02/CareyBaldwin-orderbtn.jpg" /></p><p><img src="http://www.careybaldwin.com/wp-content/uploads/2014/02/CareyBaldwin-readanexcerpt.jpg" /></p>
    </div>

    my website is http://www.careybaldwin.com I appreciate any advice.

  2. carey baldwin1
    Member
    Posted 8 months ago #

    Whoa: the linking code disappeared when I pasted it into this forum. So it looks like WordPress is removing the <a href etc. Any ideas what might be going on?

  3. alchymyth
    Forum Moderator
    Posted 8 months ago #

  4. carey baldwin1
    Member
    Posted 8 months ago #

    okay, thanks. I think my level of expertise is not enough for the forum. I don't understand the content of the link you referred me too. I'll remove the questions and code. thanks

  5. andrewcrook
    Member
    Posted 8 months ago #

    Hi carey baldwin1

    The links themselves are fine, but there's an issue with some of the styles of the surrounding divs.

    The the text widget, you've got three divs (columns) with the following styling:

    <div style="float:left; width:170px; margin-right:35px;">
    ...
    </div>

    You'll need to change that styling to instead be:

    <div style="width:170px; margin-right:35px; display: inline-block;">
    ...
    </div>

    Let me know how you go!

  6. carey baldwin1
    Member
    Posted 8 months ago #

    OMG! Totally worked. Thanks Andrew!

  7. andrewcrook
    Member
    Posted 8 months ago #

    You're more than welcome.

Reply

You must log in to post.

About this Topic