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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:07:38+00:00 2026-05-27T06:07:38+00:00

I suspect this has alerady been asked, but I could not find a way

  • 0

I suspect this has alerady been asked, but I could not find a way to solve my problem with previous answers, or I didn’t have the ability to do it (I started to study CSS ten days ago).

So I want to emulate a paper page similar to the ones shown in Adobe Reader or MS Word: a white shadow rectangle against a gray background. My requirement, though, is that, since I’m going to display it in a browser, I want to fit the page vertically, leaving a fixed-pixel-sized small margin on top and bottom.

So far, I have got the code below, which do not expand vertically. I have already got the page to look ok with maximized window using height:99%, but then the bottom margin keeps changing size, and I didn’t like the effect. I want the bottom margin with fixed-sized pixel dimensions.

<!DOCTYPE html>
<html lang="pt-br">
    <head>
        <!-- TODO: Expand page vertically but leave fixed top and bottom margins -->
        <meta charset="UTF-8" />
        <title>Relatório Html</title>
        <style type="text/css">
            html {height: 100%}

            body {
                height: 100%;
                background-color: #ccc;
            }

            .paperpage {
                position: relative;
                width: 400px;
                margin-left:auto;
                margin-right:auto;
                margin-top:10px;
                margin-bottom:10px;
                padding:30px;
                background-color: white;
                box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
            }
        </style>
    </head>

    <body>
        <div class="paperpage">
            <p>Content</p>
        </div>
    </body>
</html>
  • 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-27T06:07:39+00:00Added an answer on May 27, 2026 at 6:07 am

    Try position: absolute; and top: 10px; bottom: 10px;

    Like in This Example

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

Sidebar

Related Questions

I suspect this has already been answered somewhere, but I can't find it, so...
Probably someone has already asked this question but I'm not sure what I'm looking
I suspect this applies to general ASP.Net too but I am not sure. If
I am quite sure this question has already been asked several times and I
I suspect this is impossible, but thought I'd ask. Say I have a class
I suspect I am going to feel really stupid after posting this but here
There has to be a easy solution to this. I have been trying to
I've found an article on this subject by a Microsoft employee, but has anyone
I have a site that has been working fine for months. This morning I
I am new to both DBs and Rails (using 3.2), and I suspect this

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.