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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:42:23+00:00 2026-05-22T01:42:23+00:00

Does anyone know why my ‘container’ div isn’t showing the white bg-color from it’s

  • 0

Does anyone know why my ‘container’ div isn’t showing the white bg-color from it’s parent divs? I’m getting the black (Lime in my example for better description) bg-color from the CSS body setting.

Please excuse the sloppy styling. I did my best to reduce the code and show relative stuff. BTW, I’ve tried making the ‘container’ div and it’s child divs’ style bg-color white; and it still doesn’t work. When I give the highest div a large height attribute (say 1000px), it shows white to that point, but I thought I didn’t have to do that. It should be dynamic: as the controls within the div expand, the divs height should expand as well. I have many pages like that, but don’t have this problem.. but this is the only pg where I attempt column divs. And it happens right when my ‘container’ div for the columns start (see pic). and yea, this happens in FF and chrome. it works fine in IE

<head runat="server">
  <title>Loaner Transfer</title>
  <link rel="stylesheet" type="text/css" href="../styles/BodyLayout.css" />
  <link rel="stylesheet" type="text/css" href="../styles/columns.css" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <script language="javascript" type="text/javascript">
    ....
  </script>
</head>
<body>
  <center>
  <div style="text-align:left; width:1160px; background-color:White; border-bottom-width:25px;">
  <div id="divBody">
    <form id="form1" runat="server">
      <ajx:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
      </ajx:ToolkitScriptManager>
      <img src="../images/_Logo.gif" alt="Logo" /><br />
      <UI:Header ID="UIHeader" runat="server" />
      <UI:Menu ID="UIMenu" runat="server" />
      <center>
        <h1>Transfer Loaned Items</h1>
        <asp:Label ID="lblStatus" runat="server" ForeColor="red"></asp:Label>
        <br />
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="ISO" />
        <asp:ValidationSummary ID="ValidationSummary3" runat="server" ValidationGroup="add" />
        <asp:ValidationSummary ID="ValidationSummary2" runat="server" ValidationGroup="header" />
      </center>
      <br />
      <div id="container" style="width:1140px;">
        <div id="col1" style="width:400px;">
          <h2 style="text-decoration:underline; text-align:center;">Search and select items to transfer</h2>
          <div style="margin-left:25px;">  
            <asp:Label ID="Label1" runat="server" Font-Bold="true" Text="Pull ISO"></asp:Label>
            <asp:CustomValidator ID="CVSearch" runat="server" ErrorMessage="Invalid ISO entry."
              ControlToValidate="txtSearchISO" ValidationGroup="ISO" ValidateEmptyText="true"
              ClientValidationFunction="CheckMyText">*</asp:CustomValidator>
            <asp:TextBox ID="txtSearchISO" runat="server" Width="50px"></asp:TextBox>
            <asp:Button ID="btnSearchISO" runat="server" Text="Go!" ValidationGroup="ISO" OnClick="btnSearchISO_Click" />
            <asp:Label ID="lblHidISO" runat="server" Text="-1" Visible="false"></asp:Label>
            <br />
            <br />
            <table>
            .....
            </table>
            <br />
          <center>
            <asp:DataGrid.............................</asp:DataGrid>
          </center>
        </div>
        <div id="col2outer" style="width:710px;">  
        <center>
        <!--tables, controls, etc-->
        </center>
      </center>     
        </div>
      </div>
    </form>
  </div>
  </div>
  </center>
</body>

Here is my CSS:

body
{
    background-color:Black;
}
body.comp
{
    background-color:#F5FCFF;
}
#divBody
{
    margin-left:25px;
}
#divTrans
{
    margin:15px;
}

#container #col1
{
    float: left;
}

#container #col2outer
{
    float: right;
}

#container #footer
{
    text-align:center;
    float: left;
    width: 870px;
}

Here is a ss:
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-05-22T01:42:24+00:00Added an answer on May 22, 2026 at 1:42 am

    It looks like you simply need to clear your floats.

    You can do this by adding overflow: hidden to #container (or perhaps #divBody).

    Some further information about clearing floats:

    • http://www.ejeliot.com/blog/59
    • Is clearfix deprecated?

    Learning how and when to clear floats is an important part of CSS. You’ll save yourself a lot of confusion if you get to grips with it sooner rather than later.

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

Sidebar

Related Questions

Does anyone know how to get the operating system information from a microsoft sql
Does anyone know how to make this code stop the knob from rotating past
Does anyone know why this bean is getting instantiated multiple times? I only ever
Does anyone know how I can directly access a function from a PHP class
Does anyone know how I can open an attachment from a work item without
Does anyone know how to read an image from .res file on disk, using
Does anyone know how to add a generic principal to the HTTPContext from the
Does anyone know how can I replace this 2 symbol below from the string
Does anyone know how I can, in platform-independent C++ code prevent an object from
Does anyone know how to access the contacts from the Galaxy S? I have

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.