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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:44:46+00:00 2026-06-04T01:44:46+00:00

I want to align two sidebars and one centered image in height. Additionally the

  • 0

I want to align two sidebars and one centered image in height.
Additionally the sidebars (which contain text) should be vertical aligned in the height from the outer container.

I made a fiddle which describes the problem:
http://jsfiddle.net/SW3DT/

When having this example on a fullscreen you see everything correct but when you look into the fiddle html preview (or any smaller view) it doesn’t work anymore.

So there are following problems:

  1. Align aside and center-containers horizontal (position: absolute, left, right)
  2. Align the child object from the asides (in this case the p’s) vertically (breaks the absolute)
  3. Do this all dynamically so that it can be used on different screen sizes

How you can see all three points together make it hard to code this with css.

Does anyone have a solution?

Furthermore:
How could I define reusable css-classes for such tasks?

Best Regards,
bsus

  • 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-04T01:44:48+00:00Added an answer on June 4, 2026 at 1:44 am

    If I did understand you question correctly, you kinda want a centered wrapper with three columns, having the left and right column occupying 200px of width. If this is the case:

    See this Fiddle Example

    HTML:

    <div class="content">
        <aside class="column right">
            <p>
                 text...
            </p>
        </aside>
        <aside class="column left">
            <p>
                 text...
            </p>
        </aside>
        <div class="column center">
            <img class="home_image" src="path_to_image.png" />
        </div>
    </div>
    

    CSS:

    /* the main wrapper */
    .content {
      position: absolute; top: 50%; left: 50%;
      width: 800px; height: 500px;
      margin-left: -401px; margin-top: -251px;
      border: 1px solid #D9D9D9;
    }
    
    /* columns */
    .column {
        position: absolute; top: 0; bottom: 0;
        width: 180px;
        padding: 10px;
    }
    
    .column.left{
        left: 0; background-color: #F2F2F2;
    }
    .column.right {
        right: 0; background-color: #F2F2F2;
    }
    .column.center {
        left: 200px; right: 200px;
        text-align: center;
        width: auto;
    }
    
    .column.center img {
        border: 1px solid #111; border-radius: 22px;
        width: 128px; height: 128px;
        margin: 0 auto;
    }
    

    Furthermore: How could I define reusable css-classes for such tasks?

    You can see the .column class that is applied to the .left, .right and .center elements, thus being reused on all three.

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

Sidebar

Related Questions

I want my application to align two field, one to left and other to
This is the code. I want to align text at bottom <p style=background:#eee;font-size:1.3em;color:#022662;height:116px> <img
I have a table of one row with two columns.I want to align content
i am a new android developer,i know align two text in one button using
I want to align the text input field to align vertically I have two
I've got two spans in a div. I want to align them next to
I want to align some text to the top of a div. It seems
I want to align a list of links to be centered within a div.
Below is one item in my page, which consists of the div containing two
I'm struggling a bit with this CSS-issue: http://jsfiddle.net/timkl/JbEX8/ I want two divs to align

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.