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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:30:29+00:00 2026-06-16T10:30:29+00:00

I need container width min-height in order to hold variable size content, but at

  • 0

I need container width min-height in order to hold variable size content, but at the same time I need content to be vertically aligned inside parent container.

JS Fiddle: http://jsfiddle.net/mr_goodcat/n5Pq3/6/

HTML:

<table class="mainLayout">
    <tr>
        <td>
            <div class="contentLayout">
                <div class="tbl">
                    <div class="tcell">
                        <div class="inner">
                            CONTENT
                        </div>    
                    </div>
                </div>
            </div>
        </td>                             
    </tr>
    <tr>
        <td>
            BOTTOM
        </td>          
    </tr>
</table>

CSS:

body, html {
  background-color: lightgreen;
  height: 100%;
  width: 100%;
}

.mainLayout {
    height: 100%;
    width: 100%;
}

.contentLayout {
    width: 100%;    
    min-height: 200px;    
    border: 1px solid red;   
    display: block;
}

.tbl {
     height: 100%;
    width: 100%;
    display: table;
}

.tcell {
    width: 100%;
    height: 100%;
    background: purple;
    display: table-cell;    
    text-align: center;
    vertical-align: middle;
}

.inner {
    display: inline-block;    
}

Want to align purple box inside red square (min-height containter). How do I do that?

  • 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-16T10:30:30+00:00Added an answer on June 16, 2026 at 10:30 am

    Try this http://jsfiddle.net/n5Pq3/30/ This is a known issue with webkit. The work around is to use

    position:relative; //on parent 
    
    position:absolute; // on child
    

    Want to look into more detail then follow this link …https://bugs.webkit.org/show_bug.cgi?id=26559

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

Sidebar

Related Questions

I need to keep the height of the box the same as the height
I have a min-height 100% div that contains all the content of my website:
Following situation: I need a container for data with a rowindex. Currently we use
I need to simply copy copy images (ul>li>img) from one container to other with
I'm currently working with a big container that i need to iterater over an
My code contains a table that I need to have a fixed width. The
I am in need of a container that can handle duplicate keys like the
Ive got this problem: Line 20 (LOOT_FromContainer(container) I need that to use as Invoke
I need to append multiple nodes to a container. Rather than doing a slow
I'm wondering, is it possible to collect the height of a specific div container

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.