WordPress.org

Forums

[resolved] Change background colour for img links in sidebar (5 posts)

  1. mariahantro
    Member
    Posted 4 years ago #

    Hi,

    I'm having a small problem with customizing the look of my site. If you look at my blog, you'll notice the e-mail symbol in the sidebar, top right corner. What I want is for the grey frame/background (which turns blue when you hover) to become white, so the image looks seamlessly integrated into the background.

    I've tried to work out how to do this with CSS using Firebug (I'm in Firefox), but I can't find a separate selector for image links in the text widget area, so I can't change this to white without turning all the text links white as well. Put simply:
    is there any way to change the background only for image links, and not normal text links, in the sidebar text widget? Preferably using CSS, but if anyone's got a suggestion for a different method, I'll appreciate that, too!

  2. Peter_L
    Member
    Posted 4 years ago #

    is that grey and blue a border or a background?

    if border:
    #meta a img {border: none;}

    if bg
    #meta a img {background: none;}

  3. FishDogFish
    Member
    Posted 4 years ago #

    In the style.css there is a class set called .textwidget{.

    Linked images will sometimes display a border by default, so you can just remove the border in the .css

    .textwidget.img {
    	margin-top: 15px;
    	padding-bottom: 15px;
    	border:none;}
  4. mariahantro
    Member
    Posted 4 years ago #

    Both of you had good suggestions, but I'm afraid none of them worked. I tried this code just to see what would happen:

    img {
    	border: none;
    	background: #FFFFFF;
    }

    and it actually worked! Guess I lucked out. But thanks anyway, I appreciate you trying to help :)

  5. mariahantro
    Member
    Posted 4 years ago #

    (Turns out I needed just the
    border: none;
    to make it work)

Topic Closed

This topic has been closed to new replies.

About this Topic