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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:21:13+00:00 2026-06-14T13:21:13+00:00

I am making my first layout by using full div elements but I have

  • 0

I am making my first layout by using full div elements but I have encountered a problem.
I have a div with fixed position, and auto height(will expand based on content) but I can’t seem to be able to place another div below it. How can the div below automatically be positioned depending on the height of the div above?

These divs will be included inside a wrapper div that places them on the center of the screen.

JSFIDDLE: http://jsfiddle.net/kfbjd/ (note that the first div has a top value so the bottom div overrides it)
Fixed jsfiddle: http://jsfiddle.net/kfbjd/14/

<div id="main">
<div id="maintext">MAIN</div>

</div>

<div id="about">
<div id="maintext">ABOUT</div>

</div>

<style type="text/css">
#main{
    background-color:#000;
    width:900px;
    top:129px;
    position:fixed;
}

#about{
    background-color:#000;
    width:900px;
    position:relative;
}
</style>

Thanks for your suggestions adding top:129px to #about fixed it. There is an issue though, although it appears correctly on the jsfiddle on my browser the text appears wrapped:

enter image description here

  • 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-14T13:21:14+00:00Added an answer on June 14, 2026 at 1:21 pm

    If you move your #about inside #main, it will correctly position itself http://jsfiddle.net/kfbjd/3/

    If you can’t do that, you can just add

    top:129px;
    

    To the #about div (matching what you already gave to #main). http://jsfiddle.net/kfbjd/5/

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

Sidebar

Related Questions

Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I am new to android and making my first application. I have a problem
I'm using EF 4.1 Code First, and I'm making a configurable utility for parsing/importing
I'm making my first Node site using Express and Jade and I'm puzzled as
So I'm making my first Android app, using ADT in Eclipse and working with
I am making an MVC4 web application using Entity Framework 5 (Database-first with generated
Hello I started trying to develop Android applications today, but I have a problem:
I'm making a timeline view in html but I ran into the following problem:
I'm making a table-like layout using only CSS. With all the cells set to
I'm making a simple painting app, and it's my first time using the canvas.

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.