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

  • Home
  • SEARCH
  • 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 6048609
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:28:57+00:00 2026-05-23T07:28:57+00:00

A seemingly trivial problem. I have a very basic page in Visual Studio 2010.

  • 0

A seemingly trivial problem.

I have a very basic page in Visual Studio 2010. It’s got a master page…

<body>
    <form id="form1" runat="server">
        <div>
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
        </div>
    </form>
</body>

…with…

<div class="divStretch" />

…alone in the content.

CSS is:

body, form, html
{
    background-color: Black;
    height: 100%;
}

body
{
    margin: auto;
}

.divStretch
{
    background-color: Red;
    height: 100%;
}

Now with the <div> tags around the ContentPlaceHolder, the whole page is black. That is, the content div doesn’t show up. Without the <div> tags, red’s everywhere and the height of the content div is about twice as high as the window height, causing a vertical scrollbar to appear.

All I’d like is for the content div to exactly fill the window.

  • 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-23T07:28:58+00:00Added an answer on May 23, 2026 at 7:28 am

    Because I am new here, I am not allowed to add comments to your question – sorry about that! I’ll try my best at answering your question and will assume some things. I’ll edit the answer if I’m wrong on the assumptions.

    I’m assuming that by the “content div” you mention towards the end, you are referring to the div that’s inside the form, and when you say you’d like it to exactly fill the window you’re referring to the height (if you’d like to fill the width in this example, just add width: 100%)

    What I’ve come up with: http://jsfiddle.net/trev/3xuzZ/

    I’ve used the following CSS:

    body {
        margin: 0px;
        padding: 0px;
        background: black;
    }
    
    .contentDiv {
        position: fixed;
        top: 0px;
        bottom: 0px;
        background: red;
    }
    

    And the following HTML:

    <body>
    <form>
        <div class="contentDiv">
            <input type="text" /> <br />
            <input type="text" /> <br />
            <input type="text" /> <br />
            <input type="text" /> <br />
            <input type="submit" value="Button!" />
        </div>
    </form> 
    </body>
    

    This will take over the entire browser window though, covering any other elements you may have on the page and I’m not sure if that’s what you wanted.

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

Sidebar

Related Questions

So I'm trying to achieve something seemingly very basic in jQuery. I have a
I have a seemingly simple problem though i am unable to get my head
I have a seemingly simple problem whereby I wish to reconcile two lists so
I have this seemingly-innocent code on my main JSF page: <a4j:outputPanel id=sidebarContainer> <a4j:include viewId=#{UserSession.currentSidebar}/>
While I have the problem itself seemingly resolved, I'm hoping someone can shed some
My program is seemingly having a deadlock problem. Basically I have a class that
I've noticed some seemingly weird issues in Visual Studio 2008 (.NET 3.5) and also
Seemingly trivial problem in assembly: I want to copy the whole XMM0 register to
Hey Folks am seemingly having problems with .htaccess files. The problem: I have a
I'm having a seemingly silly problem with my gcc compiler. I have installed MinGW

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.