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

The Archive Base Latest Questions

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

I am working on getting the layout sorted for a pretty simple gallery webapp,

  • 0

I am working on getting the layout sorted for a pretty simple gallery webapp, but when I use an HTML5 doctype declaration, the height of some of my divs (which were 100%) get shrunk right down, and I can’t seem to plump them back up using CSS.

My HTML is at https://dl.dropbox.com/u/16178847/eyewitness/b/index.html and css is at https://dl.dropbox.com/u/16178847/eyewitness/b/style.css

  • If I remove the HTML5 doctype declaration, all is as I want it to be,
    but I really want to use the proper HTML5 doctype declaration.
  • If I set the doctype to HTML5 and make no changes, the div with the photo and the footer divs are not visible, presumably because they are 0px high.
  • If I set the doctype to HTML5 and make the body { height: 100px } and .container { height: 100px } or .container { height: 100% }, it becomes visible, but what I need is it to be is full height rather than a height in pixels.
  • If I try to do the same as above, but with the body { height: 100% } the photo and footer divs are not visible again.

What do I need to do to get it 100% in height so that my photo and footer divs are full height?

  • 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-04T21:44:35+00:00Added an answer on June 4, 2026 at 9:44 pm

    Only if the parent element has a defined height, i..e not a value of auto. If that has 100% height, the parent’s parent height must be defined, too. This could go until to the html root element.

    So set the height of the html and the body element to 100%, as well as every single ancestor element of that element that you wish to have the 100% height in the first place.

    See this example, to make it clearer:

    html, body, .outer, .inner, .content {
      height: 100%;
      padding: 10px;
      margin: 0;
      background-color: rgba(255,0,0,.1);
      box-sizing: border-box;
    }
    <div class="outer">
      <div class="inner">
        <div class="content">
          Content
        </div>
      </div>
    </div>

    This wouldn’t work, if I didn’t give 100% height to—say html element:

    body, .outer, .inner, .content {
      height: 100%;
      padding: 10px;
      margin: 0;
      background-color: rgba(255,0,0,.1);
      box-sizing: border-box;
    }
    <div class="outer">
      <div class="inner">
        <div class="content">
          Content
        </div>
      </div>
    </div>

    … or .inner

    html, body, .outer, .content {
      height: 100%;
      padding: 10px;
      margin: 0;
      background-color: rgba(255,0,0,.1);
      box-sizing: border-box;
    }
    <div class="outer">
      <div class="inner">
        <div class="content">
          Content
        </div>
      </div>
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a quick solution to getting some decent layout working within the tabnav
I'm getting the following error when trying to use a modular layout in my
I'm trying to get a Bootstrap dropdown working with my Jade layout. But actually
onReceive is never getting call!! I had this working and I made some changes
Hi iam working on android getting the following problem for my login but i
I was having problems getting a null layout manager working, and I found this
I am new to programing and I have some difficulties getting AlertDialog working. I
So working on getting my eclipse IDE going so I can develop my arduino
I am working on getting familiar with the Android SDK and I have having
Ok I'm working on getting better with python, so I'm not sure this is

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.