• Resolved lunaz

    (@lunaz)


    https://lunaz.com/pics/wp-img-error.png

    I tried: changing vertical-align to baseline or bottom, removing all border, padding, margin, text decoration, changing background color of:

    a img
    .alignnone
    img
    a img:hover
    .alignnone:hover
    a img:hover

    I’m unable to get rid of that border and can’t find exactly what’s causing it.

    Here’s my full stylesheet:

    [code moderated as per forum rules - a link to your site is sufficient to get the stylesheet]

Viewing 6 replies - 1 through 6 (of 6 total)
  • please link to a post/page where this can be seen live.

    this is the best way to help with css issues.

    it does not look like a border, more like extra padding on hover, with a grey background.

    Thread Starter lunaz

    (@lunaz)

    Oops, sorry, it’s at: https://lunaz.homelinux.net/wptest/
    This is my home test server haha, so all links go to 192.168… but you can see it in action on that big smily image.

    Thread Starter lunaz

    (@lunaz)

    I’m at work and I notice the style isn’t showing up from here… I’ll upload the theme to my real site when I get home then link to it.
    /me is learning everything the hard way.. ??

    Thread Starter lunaz

    (@lunaz)

    Ok, here’s one that works. ?? Sorry for the DUH moment above…

    Single Image Gallery page
    https://lunaz.homelinux.net/~wpdemo/?attachment_id=618

    it is caused by the background-color in this style (in style.css):

    a:hover {
    	background-color: #666;
    	color: #c0c0c0;
    	text-decoration: none;
    }

    in combination with a bottom margin of .5em on img:

    img {
    	margin: .5em 0 .5em 0;
    }

    (setting this margin to 0em only reduces the grey bar to half its height – i have no idea where the remaining 3px of that grey bar comes from.)

    adding something like this to style.css would obviously remove the color on that link:
    p.attachment a:hover { background: none; }

    Thread Starter lunaz

    (@lunaz)

    WOOHOO! Thanks much for the help! This ended up fixing it at the cost of having regular text links inside .post p not having a hover background. I think that’s ok unless I can give the images and p a seperate class some how?

    .post p a:hover,
    p.attachment a:hover {
    background: none;
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘non-aligned images have ugly border on hover’ is closed to new replies.