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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:11:35+00:00 2026-05-27T07:11:35+00:00

I am currently trying to design a website template for me, the problem is

  • 0

I am currently trying to design a website template for me, the problem is that I can’t get the Content div to auto expand on the content that is within it.

I wanted it to auto resize so I don’t need to set the CSS height manually.

The CSS Code I have made:

#Container {
    position: relative;
    width: 800px;
    height: 100%;
    margin: 0px auto 0 auto;
    text-align: left;
    padding-left: 1px;
    cursor: de;
    border-left: 1px solid #000001;
    border-right: 1px solid #000001;
    border-top: 1px solid #000001;
    border-bottom: 1px solid #000001;
    background-color: #C1E9FF;
}
#LogoContainer {
    background-image: url('/media/Logo.png');
    border-right-width: 1px;
    border-bottom-width: 1px;
    border-right-color: rgb(0,0,1);
    border-bottom-color: rgb(0,0,1);
    border-right-style: solid;
    border-bottom-style: solid;
    width: 400px;
    height: 50px;
    position: absolute;
    z-index: 1;
}
#LikeBar {
    border-bottom-width: 1px;
    border-bottom-color: rgb(0,0,1);
    border-bottom-style: solid;
    width: 400px;
    height: 50px;
    position: absolute;
    left: 400px;
    z-index: 1;
}
#ButtonHome {
    background-image: url('/media/Bt.png');
    width: 100px;
    height: 30px;
    position: absolute;
    top: 50px;
    z-index: 1;
}
#ButtonVideo {
    background-image: url('/media/Bt.png');
    width: 100px;
    height: 30px;
    position: absolute;
    left: 105;
    top: 50px;
    z-index: 1;
}
#Footer {
    border-top-width: 1px;
    border-top-color: rgb(0,0,1);
    border-top-style: solid;
    width: 800px;
    position: absolute;
    bottom: 0;
    z-index: 1;
    text-align: center;
}
#Content {
    position: absolute;
    top: 90px;
    width: 800px;
    height: 95%;
    border-top: 1px solid #000001;
}
#YouTubeBox {
    position: absolute;
    background-image: url('/media/Box.png');
    width: 100px;
    height: 30;
    left: 10px;
    text-align: center;
}
#TwitterBox {
    position: absolute;
    background-image: url('/media/Box.png');
    width: 100px;
    height: 30;
    left: 110px;
    text-align: center;
}
#FaceBookBox {
    position: absolute;
    background-image: url('/media/Box.png');
    width: 100px;
    height: 30;
    left: 210px;
    text-align: center;
}
.DivT { line-height: 1px }

HTML Code with the DIV

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta name="generator" content=
  "HTML Tidy for Linux/x86 (vers 11 February 2007), see www.w3.org" />

  <title>HTML CODE</title>
  <meta name="description" content="Null" />
  <meta name="keywords" content="Null" />
  <link href="ThemeV1.css" rel="stylesheet" type="text/css" />
</head>

<body background="/media/Background.png">
  <div id="Container">
    <!-- Start Container -->

    <div id="LogoContainer"></div>

    <div id="LikeBar"></div><!-- Menu Controls -->

    <div id="ButtonHome"></div><!-- WEBSITE CONTENT -->

    <div id="Content">
      <p class="DivT">We're upgrading the website with a new design and hopefully it will
      be faster, so check back later.</p>
    </div><!-- END WEBSITE CONTENT -->
    <!-- Footer -->

    <div id="Footer"></div><!-- End Footer -->
  </div><!-- End Container -->
</body>
</html>

So, what is wrong? I want to save time to not set the height manually.

  • 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-27T07:11:35+00:00Added an answer on May 27, 2026 at 7:11 am

    Since your div#Content is absolutely positioned within div#Container, the container will ignore the height and width of the content when determining its own dimensions. Try giving div#Content a position value of relative. Then, as mentioned in the comments above, switch its height property to min-height. If you need to stick with absolute positioning and still want a content-affected height, you’ll have to use JavaScript to adjust the style.height of the containing div when the height of the content div changes.

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

Sidebar

Related Questions

So I have this template design that is currently absolutely positioned, but I'm trying
I'm trying to design a website for my mums backpackers business. The problem that
Maybe I have a bad design but I am currently trying to get an
Within a research project that I'm currently working on, we're trying to define the
I currently trying to find a solution, how to ensure that a test fails
I'm currently trying to build a personal website to create a presence on the
I'm currently trying to get into the Java EE development with the Spring framework.
I am currently trying to design a DB for a new project I am
I'm currently having an issue where I have a javascript object that is trying
I am currently trying to design a piece of screen-capture software. One design question

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.