Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
Like Tree1Likes
  • 1 Post By TheGAME1264

Thread: Rollover linked images are stacking?

  1. #1
    Junior Member jennilynn6's Avatar
    Join Date
    Feb 2013
    Posts
    25
    Member #
    35169

    Rollover linked images are stacking?

    Hello all - hoping someone can help. I'm editing this site for a client - totally under construction. I was adding rollover social media buttons at the bottom - should be easy enough, right - and I can't figure out why they are stacking on top of one another rather than sitting next to each other. There's plenty of room in the div so I'm stuck.

    IMT Bootcamp
    this is an example of how my code looks for each icon:

    HTML:
    Code:
    <div id="footerright2">    <a id="facebook" href="#" title="facebook"><span>facebook</span></a>
        <a id="twitter" href="#" title="twitter"><span>twitter</span></a>
        <a id="youtube" href="#" title="youtube"><span>youtube</span></a>
        <a id="linkedin" href="#" title="linkedin"><span>linkedin</span></a>
        </div><!--close #footerleft-->
    CSS: (each is the same, just replace twitter, linkedin and youtube where 'facebook' is)
    Code:
    #facebook{
      display: block;
      width: 32px;
      height: 32px;
      background: url("images/facebook.png") no-repeat 0 0;
    
    
    }
    
    
    #facebook:hover
    { 
      background-position: 0 -32px;
    }
    
    
    #facebook span
    {
      position: absolute;
      top: -999em;
    }

    Any help would be greatly appreciated! Thanks!

    - Jenni

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    You're using display: block; That means you're creating block-level elements, like divs and paragraphs are normally. Hence the stacking.

    If you want to do them vertically, you can either set display to inline-block (if IE7 and I believe IE8 aren't issues) or you can add float: left to the elements (be sure to clear them after.)
    jennilynn6 likes this.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member jennilynn6's Avatar
    Join Date
    Feb 2013
    Posts
    25
    Member #
    35169
    Wonderful thank you!!!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:05 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com