Simple Problem with Borders (Simpler Version) (4 posts)

  1. ptrinh
    Posted 10 years ago #

    Here is a very simple problem:

    I need a large container, width: 900 px, that will envelope my blog. Inside this large container is a header, floated at the top. Below the header is a smaller container.

    Index file looks like this:
    <div id = "bigcontainer">
    // Generate the header
    <div id = "smallercontainer">
    //Generate the post

    The style sheet has this:
    margin:0 auto;
    padding:0px 3px;
    border: thick solid #FF0000;
    #smallercontainer {
    top: 194px;
    overflow: hidden;

    Here is the simple problem. When the above is generated, I get a big red border, but ONLY around the header file. When smaller container is not positioned absolutely (the line is removed), then the red border surrounds everything. Why is this happening? Why does my big container not contain the little container?

  2. Medizinische Abkuerzungen
    Posted 10 years ago #

    If you use a position-tag in a div it will be positioned relative or absolute to the parent, but not inside the parent-div.

  3. katesgasis
    Posted 10 years ago #

    try putting position:relative; in the #largecontainer

  4. Medizinische Abkuerzungen
    Posted 10 years ago #

    relative will display a border around the largecontainer. But around the largecontainer in the old position (before moving it down to position 194

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.