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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:45:17+00:00 2026-05-28T02:45:17+00:00

I am trying to create a 2 column layout with my html and its

  • 0

I am trying to create a 2 column layout with my html and its just not happening. Here’s my code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Welcome</title>
<style>
body {
    margin: 0;
    padding: 0;
    width: 100%;
    color: black;
    font: normal 12px/1.8em Arial, Helvetica, sans-serif;
    background-color: #132959;
    background-repeat: repeat;
    background-position: left top;
}


.outer{
    width:970px;
    margin: 0 auto;
    background: black;
}

.toc{
    width:250px;
    margin: 0;
    padding:0;
    float:left;
    color:yellow;
}

.content{
    padding: 0;
    width:720px;
    float:right;
    color:white;
}
.container{
    width:970px;
    margin: 20px auto;
}

.logo {
    margin: 0;
    padding: 0;
    float: left;
    width: auto;
}

.logo a{
    color : #fff;
    text-decoration:none;
    font: bold 40px/1.2em Arial, Helvetica, sans-serif;
    letter-spacing: -2px;
}

.logo small {
    display: block;
    padding-left: 80px;
    font: normal 12px/1.2em Arial, Helvetica, sans-serif;
    color: #EDF3F6;
    letter-spacing: normal;
}

.logoimage {
    height: 50px;
    border: none;
    margin: 0;
}
</style>
</head>
<body>
<div class="container">
<div class="logo"> 
    <a href="http://www.csmart.co.in">Csmart 
    <small>Let's make life easy!</small> </a> 
</div>
<div style="clear:both;padding:15px"/>
<div class="outer">
  <div class="toc"> 
  TOC
  </div>
  <div class="content">
    Welcome
  </div><!-- content -->
</div><!-- outer-->
</div>

My div outer is coloured black. But it does not show up on the screen. If I give a height to .outer.. then it shows up. But it doesn’t have to be this way.. I can’t predict the height of the page. Why doesnt the background colour of the div outer not show up on the browser?

  • 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-28T02:45:17+00:00Added an answer on May 28, 2026 at 2:45 am

    All of your inner elements are floated, and therefore have no height. You will need to unfloat one of the inner elements, provide a height for the container element, or add a clearing div after the outer element.

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

Sidebar

Related Questions

I'm trying to create a two column layout. the left column contains a list
I'm trying to create a very simple 2 column layout with floating div 's
I'm trying to create a two column layout with rows and one row at
I am trying to create a 4 column <div> layout. Why are the row
I'm trying to create a two column layout with a footer. Till now the
I am trying to create a two column layout, with content in column 1
Im trying to create a three column layout with a fluid center and fixed
I'm trying to create a three column layout in CSS only with fixed left
I am trying to create a column in a table that's a foreign key,
I'm trying to create a standard two-column form, where the first column is a

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.