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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:09:34+00:00 2026-05-23T05:09:34+00:00

as an excercise i decided to delve in to css layout styling and am

  • 0

as an excercise i decided to delve in to css layout styling and am already failing to see why my layout is not aligning correctly. also why is the container div only appearing when there some text in there. i thought it would display and grow based on the background property in css statement. i have done screengrab to show problem. can someone show my error. thanks

screen grab: http://imageshack.us/photo/my-images/21/containergrabnew.png/

css

#container  {

  width: 800px;
    margin: 0 auto;
  background-image: url(../images/container-bg.gif);
    background-position: center center;
  background-repeat: repeat-y;
}
#containerLeft {

  width: 475px;

    float:left;
  background-image: url(../images/container-left-bg.gif);
    background-position: center center;
  background-repeat: repeat-y;
}
#containerRight {

  width: 300px;

    float:right;
  background-image: url(../images/container-right-bg.gif);
    background-position: center center;
  background-repeat: repeat-y;
}

html

<div id="container">
    This is the container
    <div id="containerLeft">
      This is the left container

    <div id="containerRight">
      This is the right container
    </div></div>
  </div>
  • 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-23T05:09:34+00:00Added an answer on May 23, 2026 at 5:09 am

    am already failing to see why my
    layout is not aligning correctly

    Your HTML is not nested correctly. Change it to this:

    <div id="container">
        <div id="containerLeft">
          This is the left container
        </div>
    
        <div id="containerRight">
          This is the right container
        </div>
    </div>
    

    also why is the container div only
    appearing when there some text in
    there. i thought it would display and
    grow based on the background property
    in css statement.

    You need to clear your floated elements.

    You can do this by adding overflow: hidden to #container.

    You should read this article for more information: http://css-tricks.com/all-about-floats/

    It discusses why this happens, various ways to fix it, and includes useful and relevant information about floats in general.

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

Sidebar

Related Questions

I've been working through Practical Common Lisp and as an exercise decided to write
I decided to port the class in C# below to F# as an exercise.
This is a mental excercise that has been bothering me for a while. What
As a learning excercise, I've just had an attempt at implementing my own 'merge
As an exercise in both writing Windows Services and communicating with them, I've decided
As of last night, I decided to start learning about WPF and have been
I recently decided to try to learn some bash scripting and as a fun
Going through some excercises to hone my binary tree skills, I decided to implement
For reasons of self-improvement / broadening my horizons I have decided to learn some
On a whim, I've decided to go back and seek certification, starting with 98-361,

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.