/    Sign up×
Community /Pin to ProfileBookmark

I’m trying to add some simple social networking rollovers to my website, but can’t quite get them how I like. Thank you in advance for any help. My site is located here:

[url]http://www.esteindesign.com/new/portfolio/work/[/url]

I have two things I’d like to improve:

  • 1.

    I would like to space the buttons out a bit. About 15 px each. I have tried to adjust the padding, but somehow I am having trouble moving both the original and the hover state.

  • 2.

    Visual appearance: In the non-hover state, you can still see a bit of the hover state around the edges. This is especially noticeable on the Facebook button since the hover is darker. Is there any way to fix this? Also, the buttons seem to flicker a lot, is that just how CSS rollovers work?

  • Here’s the code I’m working with:

    HTML:

    <div class=”iconfacebook”>
    <a href=”http://www.facebook.com/esteindesign” target=”_blank”><img src=”http://www.esteindesign.com/new/wp-content/uploads/badges/facebookgrey.png” alt=”Facebook” title=”Facebook” width=”40″ height=”40″ /></a></div>

    <div class=”icontwitter”> <a href=”http://twitter.com/esteindesign” target=”_blank”><img src=”http://www.esteindesign.com/new/wp-content/uploads/badges/twittergray.png” alt=”Twitter” title=”Twitter” width=”40″ height=”40″ /></a></div>

    <div class=”iconfeed”>
    <a href=”http://feeds.feedburner.com/esteindesign” target=”_blank”><img src=”http://www.esteindesign.com/new/wp-content/uploads/badges/rssgrey.png” alt=”RSS Feed” title=”RSS Feed” width=”40″ height=”40″ /></a></div>
    </div>

    CSS:

    .iconfacebook
    {
    position: relative; background: url([url]http://www.esteindesign.com/new/wp-content/uploads/badges/facebookblue.png[/url]) no-repeat; white-space: nowrap;
    display: block; width: 40px; height: 40px; margin: 0; padding: 0; float:left;
    }

    .iconfacebook img
    {
    width: 40px; height: 40px; border: 0
    }

  • * html a:hover
    {
    visibility:visible
    }
  • .iconfacebook a:hover img
    {
    visibility:hidden;

    }

    .icontwitter
    {
    position: relative; background: url([url]http://www.esteindesign.com/new/wp-content/uploads/badges/twitterblue.png[/url]) no-repeat; white-space: nowrap;
    display: block; width: 40px; height: 40px; margin: 0; padding: 0; float:left;
    }

    .icontwitter img
    {
    width: 40px; height: 40px; border: 0;
    }

    .icontwitter a:hover img
    {
    visibility:hidden;
    }

    .iconfeed
    {
    position: relative; background: url([url]http://www.esteindesign.com/new/wp-content/uploads/badges/rssorange.png[/url]) no-repeat; white-space: nowrap;
    display: block; width: 40px; height: 40px; margin: 0; padding: 0; float:left;
    }

    .iconfeed img
    {
    width: 40px; height: 40px; border: 0
    }

    .iconfeed a:hover img
    {
    visibility:hidden
    }

    to post a comment
    CSS

    0Be the first to comment 😎

    ×

    Success!

    Help @estein219 spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 6.17,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @nearjob,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,

    tipper: @meenaratha,
    tipped: article
    amount: 1000 SATS,
    )...