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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:07:13+00:00 2026-05-25T18:07:13+00:00

I am trying to create a two column layout, with content in column 1

  • 0

I am trying to create a two column layout, with content in column 1 both horizontally and vertically aligned in the middle, whereby the content of column 2 will vary in size. The width of both columns is fixed to 50% of the width of the screen.

In modern CSS complaint browsers I can simply do the following:

CSS:

#wrapper
{
    display: table;
    width: 100%;

    /* for illustration purposes */
    background: #ddd;
}

#left-column
{
    display: table-cell;
    width: 50%;
    text-align: center;
    vertical-align: middle;

    /* for illustration purposes */
    background: #fdd;
}

#right-column
{
    display: table-cell;

    /* for illustration purposes */
    background: #ddf;
}

HTML:

<div id="wrapper">
    <div id="left-column">
        <p>I am both horizontally and vertically centered in column 1</p>
    </div>
    <div id="right-column">
        <p>I am dynamic content in column 2, i.e. my size will vary</p>
        <p>I am dynamic content in column 2, i.e. my size will vary</p>
        <p>I am dynamic content in column 2, i.e. my size will vary</p>
        <p>I am dynamic content in column 2, i.e. my size will vary</p>
        <p>I am dynamic content in column 2, i.e. my size will vary</p>
    </div>
</div>

However, the bad news is I also need this to work in IE6, and IE7…

The solutions I’ve seen so far are quite ugly and involve lots of nested divs. What’s the cleanest way to achieve this so that it will work in all browsers? I’ve experimented with float: left, for the two column layout, but my main problem is the vertical alignment in the first column.

PS. I don’t want to use tables for the layout, although it does work, it’s bad for screen readers and therefore breaks my accessibility guidelines.

Thanks in advance!

  • 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-05-25T18:07:14+00:00Added an answer on May 25, 2026 at 6:07 pm

    With static content on the left-hand column, your solution is simple: use fixed heights and padding.

    CSS

    #left-column {
        height: 50%; /* adjust height dependent on N&S padding */
        padding: 20% 0; /* adds north and south padding to "center" #left-content */
    }
    #left-content {
        height: 10%; /* adjust to exactly fit content */
        text-align: center;
    
        /* basically for testing, this will help us find the ideal
         * percentage for our #left-content height. */
        overflow: hidden;
        background-color: red;
    }
    

    HTML

    <div id="left-column">
    
        <div id="left-content">
    
            your image and text goes here
    
        </div><!-- /left-content -->
    
    </div><!-- /left-column -->
    

    In your CSS, you will need to adjust the heights and paddings to achieve your desired result.

    I would suggest ensuring the content in #left-content is 100% responsive. This may not be a 100% solution, but with some work on it (@media queries, etc), you should be able to achieve your goal in every browser and viewport size. The only thing I can think of off the top of my head that might break something like this is user-increased font size.

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

Sidebar

Related Questions

I'm trying to create a two column layout. the left column contains a list
I'm trying to create a two column layout with rows and one row at
I'm trying to create a two column layout with a footer. Till now the
I'm trying to create a standard two-column form, where the first column is a
I'm trying to create a method that will sum two timeO objects and return
I am trying to create a select query which will split a column values
I'm trying to make a CSS fixed width, two column, header and footer layout.
I'm trying to create a table with two columns comprising the primary key in
I'm trying to create two ASP.NET Membership login pages for an ASP.NET website I'm
I am trying to create two different sets of settings for datepicker( http://keith-wood.name/datepick.html )

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.