CSS Question

Out of context: Reply #15

  • Started
  • Last post
  • 29 Responses
  • epikore0

    I think the main issue i'm trying resolve at the moment is nested div tags extending the boundaries of the main div tag. I've uploaded a simpler version here:

    http://www.epikore.0catch.com/te…

    Notice the smaller box on the lower right of the browser. I want that box to stay inside the bigger box on the top right.

    <!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>CSS Test 2</title>

    <style type="text/css">
    body {
    background-color: #F9F1BF;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    font-family: Verdana, Geneva, sans-serif;
    color: #600;
    font-size: 11px;
    }

    #main {
    background-color:#930;
    width: 300px;
    height: 300px;
    }

    #inside {
    background-color:#C63;
    width: 100px;
    height: 100px;
    position: absolute;
    bottom: 0px; right: 0px;

    }

    </style>
    </head>

    <body>
    <div id="main">
    boogie woogie
    <div id="inside">
    boogie woogie
    </div>
    </div>
    </body>
    </html>

    • use floats, then control its position with margins.

      pablito

View thread