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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T13:07:56+00:00 2026-06-01T13:07:56+00:00

I have a website layout consisting of 4 divs. <div class=global> <div class=content> </div>

  • 0

I have a website layout consisting of 4 divs.

<div class="global">
<div class="content">
</div>
<div class="top">
</div>
<div class="footer">
</div>
</div>

the has the following style applied

div.top{
position:fixed;
top:0px;
width:100%;
height:28px;
background-color:rgb(55,55,55);
border-bottom:1px solid black;
}

the has the following style applied

div.footer{
position:fixed;
float:right;
bottom:0px;
left:87.5%;
border:1px solid:black;
border-bottom:0;
}

and the has this

div.content{
position:absolute;
bottom:0;
top:28px;
width:100%;
background:transparent;
margin:auto;
padding:0;
}

the problem I am having is with the content div, I want it to start directly below the top and continue down the rest of the page, however it goes over the bottom of the page by exactly however many px I set the position of top too. Now as I’m using px for the size of the top, I can’t apply a percentile, so what would be the best way of doing this using only css.

The website I need this for is http://www.andysinventions.info/test/ and the problem can be seen on the tab labelled “Forums”

tl;dr how can I stop my div going over the page boundaries?

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

    Andrew,

    After looking over the answers (which are correct for the most part) and your site – I noticed you are using Iframes. In the year of 2012, iframes are a thing of the past as a design feature, only to be used as 3rd party additions like offsite widgets and feeds (or sandboxing).

    You need to structure your page like this for what you are going for:

    <!doctype html>
    <html>
      <head>
        <title>A title</title>
        <link href="style.css" rel="stylesheet" />
      </head>
      <body>
        <ul id="menu">
          <!-- menu content here -->
        </ul>
        <!-- Actual page content here -->
      </body>
    </html>
    

    In the style.css have these rules:

    body { margin: 28px 0 0; }
    
    ul#menu {
      position: absolute;
      top: 0;
      left: 0;
      }
    

    This should achieve what you are looking for using modern technique.

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

Sidebar

Related Questions

I have a website that has a menu div at the top and a
I have a basic website nav layout that looks like this: <li class=folder parent_folder>
I have a website setup with DIV managed layout. The problem is that under
I have a website of quite a few pages which also has a style
I have a website of quite a few pages which also has a style
Basically I have a masterpage defining the basic layout of the website. What I
I have website, usually all looks fine but sometimes one div is on the
So basically I have website that has names of cities that can be checked
I have a website that has around 10 pages. Only one of those pages
I have a website I'm working on that I should have perfected the layout

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.