Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8825869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T06:59:04+00:00 2026-06-14T06:59:04+00:00

I have an element that’s 60px tall that has other elements like an image

  • 0

I have an element that’s 60px tall that has other elements like an image and a couple of spans inside of it and I’m having trouble getting them to align vertically inside the 60px high element. Here’s the mockup and CSS:

<div class="member">
    <img src="images/pic.png" alt="John Smiths's Profile Picture" class="pic">
    <span class="name"><a href="">John Smith</a></span>
    <span class="skills">PHP, MySQL, Javascript, C#, Java</span>
</div>

#sidebar .member {
    height: 60px;
    margin-bottom: 10px;
    vertical-align: center;
}

#sidebar .member .name {
    font-size: 15px;
    font-weight: bold;
}

#sidebar .member .pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    float: left;
    margin-right: 10px;
}

#sidebar .member .skills {
    display: block;
    font-size: 12px;
    overflow: hidden;
}

I’ve put it up on jsfiddle: http://jsfiddle.net/CYFyx/2/

As you can see, the elements within the .member element push to the top. I need them vertically aligned like so:

enter image description here

Already tried vertical-align: middle; but with no luck.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T06:59:05+00:00Added an answer on June 14, 2026 at 6:59 am

    You can use vertical-align: middle in td table layout only. So you have to add a div around the spans

    <div class="cell">
        <span class="name"><a href="">John Smith</a></span>
        <span class="skills">PHP, MySQL, Javascript, C#, Java</span>
    </div>   
    

    with this properties

    #sidebar .member .cell {
        display: table-cell;
        vertical-align: middle;
        height: 50px;
    }
    

    You can test it here: http://jsfiddle.net/Tn2RU/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element that needs to behave like UIButton but it has several
I have an element in my document that has a background color and image
If have an element that maybe disabled on a page, and would like to
I have an anchor element that looks like this <a href=url><img src=imgurl/>Text</a> I would
I have some data in an XML element that looks like this: <?xml version=1.0
I have overlay inside HTML element and inside that overlay I have element that
I have an element that has two classes but can't seem to select it
I have an element that has -moz-transform applied to it with translateX() , translateY()
So I have an element that has an onClick event thusly: var foobar =
I have a element (that allows multiple file uploads). I would like to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.