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 8214317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:25:16+00:00 2026-06-07T11:25:16+00:00

Consider following: <div class=wrap> <div class=left></div> <div class=right></div> </div> Left div has less height

  • 0

Consider following:

<div class="wrap">
    <div class="left"></div>
    <div class="right"></div>
</div>

Left div has less height than the right div. Can I set the left div vertically in the middle of the right div? I can not set the margin-top because the height varies.

enter image description here

Here’s the jsfiddle link:
http://jsfiddle.net/k8972/

  • 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-07T11:25:18+00:00Added an answer on June 7, 2026 at 11:25 am

    Hi now used to display inline-block and give to vertical-align and remove to float

    as like this

    .wrap{
        overflow:hidden;
        border:1px solid red;
        width:250px;
        display:table;
    }
    
    
    .left{
        width:100px;
        height:50px;
        background:yellow;
        display:inline-block;
        vertical-align:middle;
    }
    
    .right{
        width:100px;
        height:100px;
        background:brown;
        display:inline-block;
        vertical-align:middle;
    }
    

    live demo http://jsfiddle.net/k8972/2/

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

Sidebar

Related Questions

Consider the following example : HTML: <div class=wrapper> <div class=left>Some text here</div><div class=right>Hello Stack
This problem is only in IE. Consider the following HTML: <html> <body> <div style='position:absolute;left:1em;right:1em;top:1em;bottom:1em;overflow:auto;>
Consider the following tag: <div class=my_class style=width: 453px; height: 604px;> // stuff </div> I
Consider the following code: $(document).ready(function() { $(body).append(<div class='outer'><span class='inner'>Click me</span></div>); $(html).click(function(event) { var targetClass
Consider the following: HTML <div class=info_bubble> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Consider the following example: ( live demo here ) HTML: <div class=board> <div class=row>
Consider the following HTML snipped: <input type=submit value=Delete selected><input type=submit value=Print selected> <div class=table>
Consider the following html: <div class=image> <img src=sample.png/> <div class=text> Text of variable length
Consider the following HTML : <a id=add herf=#>add</a> <div class=list> <select> <option>1</option> <option>2</option> </select>
Consider the following HTML structure: <div class=content> <div class=field field-type-date field-field-event-date> <div class=field-items> <div

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.