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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:42:31+00:00 2026-06-02T15:42:31+00:00

I have the following css and html files: body{ text-align: center; background-color: #eeeeee; margin:

  • 0

I have the following css and html files:

body{
    text-align: center;
    background-color: #eeeeee;
    margin: 0;
    padding: 0;
    font-size: 1em;
    font-family: Helvetica,Arial,sans-serif;
}
#wrapper{
    margin: 0 auto;
    width:900px;
    border: 1px solid #cccccc;
    background-color:#ffffff;
    padding:5px;
}
#banner{
    width:900px;
    height: 150px; 
    background-image: url("../images/logo.png");
    background-repeat: no-repeat; 
}
#separator{
    width:100%;
    height: 5px;
    border: 1px solid #993311;
    background-color: #993300;
}
#navbar{
    height:25px;
    width: 100%;
    background-color: #434a4f; 
}
#topsearch{
    height:25px;
    width: 100%;
    background-color: #434a4f; 
}
#breadcrumb{
    float:left;
    width: 30%;
    background-color: #cccccc;
}
#search{
    float:left;
    width:70%;
    background-color: #fccfcf;
}
#main{
    clear: both;
}
#mainleft{
    float:left;
    width: 21%;
    background-color: #ff0000;

}
#maincenter{
    float:left;
    width: 58%;
    background-color: #00ff00;
}
#mainright{
    float:left;
    width: 21%;
    background-color: #0000ff;
}
#mainright1{
    width: 100%;
    height:20%;
    background-color: #0000ff;
}
#mainright2{
    clear:both;
    width:100%;
    height: 21%;
    background-color: #0000ff;
}
#footer{
    clear: :both;
    width: :100%;
    background-color: #333333;
}

and

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

        <title>test</title>
        <meta name="description" content="" />
        <meta name="generator" content="Studio 3 http://aptana.com/" />
        <meta name="author" content="byteslash" />

        <meta name="viewport" content="width=device-width; initial-scale=1.0" />

        <link href="css/template.css" type="text/css" rel="stylesheet"/>
    </head>
        <body>

        <div id="wrapper">
            <div id="banner"></div>
            <div id="separator"></div>
            <div id="navbar">
                NavBar
            </div>
            <div id="topsearch">
                <div id="breadcrumb">Breadcrumb</div>
                <div id="search">SearchBox</div>
            </div>

            <div id="main">
                <div id="mainleft">
                    MainLeft
                </div>
                <div id="maincenter">
                    MainCenter
                </div>
                <div id="mainright">
                    <div id="mainright1">MainRight1</div>
                    <div id="mainright2">MainRight2</div>
                </div>              
            </div>
            <div id="footer">
                <h6>Footer</h6>
            </div>
        </div>
    </body>
</html>

if you check the colors, i have mainright2 showing as blue on top of mainright1, which is intended but mainright2 is hanging on top of footer.

I think that one way to solve that would be to somehow make the div main account for all heights defined inside its children, but i dont know how.

  • 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-02T15:42:32+00:00Added an answer on June 2, 2026 at 3:42 pm

    This is happening because your #main div has a height of 0px – all of its contents are floating. There are many ways to solve this, and one of them is to apply overflow: hidden to the #main div, like that:

    #main{
        overflow: hidden;
        clear: both;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following CSS and HTML: .TestPadding{ width:29px; text-align:center; height:18px; padding:3px 0px 2px
I have the following defined in my css file: body { text-align: center; float:
I have the following html files: <html> <head> <style type=text/css> .table-striped { padding: 0;
I have the following code: <!DOCTYPE html> <html> <head> <link rel=stylesheet type=text/css media=screen href=jquery-ui-1.8.9.custom.css
I have the following file: <html> <head> <title></title> <link rel=css type=text/css href=/empty.css title=css />
I have the following html/css that is causing problems in Firefox 1.5 and 2,
I have the following html/css code . When I have the screen resolution to
I have the following html and css. But what I can't figure out is
I have defined a fieldset in HTML, and applied the following (simple) CSS rules
I have the following CSS code .editable:before { content: url(../images/icons/icon1.png); padding-right:5px; } this is

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.