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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:56:22+00:00 2026-06-15T00:56:22+00:00

I have an outer div with a few inner divs like this: HTML: <div

  • 0

I have an outer div with a few inner divs like this:

HTML:

<div class="clearfix bigBox">
   <div class="bigBoxBody">
      <div class="containerWithHeaderContent">
      </div>
   </div>
</div>

CSS:

#content .bigBox {
    padding-bottom: 9px;
    width: 100%;
}
#content .containerWithHeader, .containerWithHeaderContent {
    padding: 10px 0;
    width: 100%;
}

.clearfix:after {
    clear: both;
    content: " ";
    display: block;
    font-size: 0;
    height: 0;
    line-height: 0;
    visibility: hidden;
    width: 0;
}

My problem is that the inner div (bigBoxBody) does not seem to be getting the height in line with the height of the outer div (bigBox).

Screen shot:

(The outer div is red, and the inner div is green.)
enter image description here

I am not sure what is wrong with this, or if there are any other things that need to be taken care of using CSS.

jsFiddle: http://jsfiddle.net/UFFx3/2/

  • 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-15T00:56:24+00:00Added an answer on June 15, 2026 at 12:56 am

    The divs won’t naturally occupy the full vertical space available to them. See this jsfiddle for an example. The outer div is given an explicit height of 100 pixels, and the inner div has no height specified at all. The inner div thus only take up the space needed to display its contents.

    HTML:

    <div class="outer">
       <div class="inner">
           <p>Content here!</p>       
       </div>
    </div>​
    

    CSS:

    .outer {
        background: red;
        height: 100px;
    }
    .inner {
        background: green;
    }
    

    ​
    If you want the inner div to take up all the vertical space available, set height:100% in the CSS. See this jsfiddle for an example.

    New CSS:

    .outer {
        background: red;
        height: 100px;
    }
    .inner {
        background: green;
        height: 100%; /* new line */
    }
    

    I’m not sure if there are any more specifics to your problem as you are using a clearfix CSS class that isn’t shown in your example. Please let me know if there’s something else missing for you to solve your problem.

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

Sidebar

Related Questions

I've got this html (simplified) <div class=outer style=float:left> <div class=inner style=float:left> <div class=contained style=clear:both>...</div>
I have Outer DIVS like this. <Input id =SaveMe value=Click type=submit > </Input> <DIV
I have two div's which looks like this <div id=outer> <div id=inner> </div> </div>
I have code like this: <div class='outer'> <div class='imgwrapper'><img /></div> <div class='caption'>This is a
I have this div structure <div class=panel> <div class=north></div> <div class=center></div> </div> The outer
Say, we have: <div class=outer> <div class=inner> <span class=text>Hello!</span> </div> </div> The 'outer' div
I have two divs, one inner and one outer, but the inner div is
I have the following code: <div class=outer-div> <img onmouseover=showDiv(this) src={{ STATIC_URL }}/images/user_male.png> <a onmouseout=hideDiv(this)
I have sample div structure: <div id=outer style=width:600> <div class=inner></div> <!--row1--> <div class=inner></div> <div
I have a hierarchy as follows: <div class=outer> <h1>Heading</h1> <p>Paragraph</p> <p><a>Link</a></p> <div class=inner> <h1>Heading</h1>

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.