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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:20:19+00:00 2026-06-05T01:20:19+00:00

soooo i can’t seem to get some div alignments to work. basically, i have

  • 0

soooo i can’t seem to get some div alignments to work. basically, i have a container div, and i want a left column and a right column inside the div, and basically the right column is always going to be vertically greater than the left column. so i want the left column to vertically center next to the right column. here is my css:

.recipe_container{
    float:center;
    width:800px;
    position:relative;
    padding:0px;
    border:5px solid #B22222;
    margin:0px auto;
}
.recipe_container_left{
    float:left;
    width:390px;
    position:relative;
    top:50%;
    padding:4px;
    border-right:1px solid;
    margin:0px auto;
}
.recipe_container_right{
    float:right;
    width:390px;
    position:relative;
    padding:4px;
    border-right:1px solid;
    margin:0px auto;
 }

and the html is nestled like so

<div class="recipe_container">
    <div class="recipe_container_left">
         recipe title and ingredients
    </div>
    <div class="recipe_container_right">
         recipe cooking instructions
    </div>
 </div>

but the left “recipe_container_left” div doesn’t vertically center inside the parent “recipe_container” div. I’ve been googling for a little while and can’t seem to get anything to work. i know, newbie problem. any help?

like this is what i want as a result (that dynamically scales to the browser window some):

------------------------------------------------------------
recipe_container             ============================
                             |                          |
                             |  recipe_container_right  |
 =========================== |  recipe cooking-         | 
 | recipe_container_left   | |  -instructions           |                   
 | recipe title+ingredients| |                          |
 |                         | |                          |
 =========================== |                          |
                             |                          |
                             |                          | 
                             ============================
------------------------------------------------------------
(repeat)
  • 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-05T01:20:21+00:00Added an answer on June 5, 2026 at 1:20 am

    best way to do this is use javascript to align the left div or if you really want to use css you can try

    <div class="recipe_container_left">
       <div class="left_inner"></div>
    </div>
    
    .recipe_container_left{
       position:relative;
       top: 50%;
    }
    .left_inner{
       position:relative;
       top: -50%;
    }
    

    edit: this approach will need to set a height in order for the top position to work.
    Try this table approach, works better without setting any fix height.

    <div class="recipe_container">
        <div class="recipe_container_left">
            recipe title and ingredients
         </div>
    
        <div class="recipe_container_right">
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
           recipe cooking instructions
       </div>
    </div>
    

    ​​​​​​​​​​​​​​​​​

    .recipe_container{
    display: table;
    }
    .recipe_container_left{
    display: table-cell;
    vertical-align: middle;
    width: 300px;
    }
    .recipe_container_right{
    width: 400px;
    }
    

    jsfiddle to see it in action ​

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

Sidebar

Related Questions

suppose I have this string: some striinnngggg <a href=something/some_number>linkk</a> soooo <a href=someotherthing/not_number>asdfsadf</a> I want
I have some issue I can't find any info about! I did a clean
Soooo we have this system here that's working as follows: We have a Java
I've had soooo much trouble getting this code to work properly!!!! It runs fine
So I have been working with multiple different MS Access apps at work (about
We use VisualSVN server here at work and everything works fine, we have over
I work on a big project in company. We collect data which we get
I really hope someone can help on this because I'm learning cocoa and have
For some reason, I need to restart a GLSurfaceView.Renderer so I want some time
soooo i have this function that prints one of 5 random texts ON an

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.