5 Replies Latest reply on Feb 28, 2010 6:52 PM by panfried

    child div moves when image is placed in parent

    panfried Level 1

      Granted I've only been messing with Dreamweaver for a day now, but I can't seem to understand why a div moves out of place when an image is placed in the parent div. Advice would be greatly appreciate!

       

       

       

      <body>

      <div id="header_wrap">

        <div id="header"><img src="........../flower.png" width="83" height="74" />

          <div id="header_nav"></div>

        </div>

      </div>

      </body>

       

       

      --

       

       

      #header_wrap {

      background-color: #1a1a1a;

      height: 100px;

      width: 100%;

      margin-right: auto;

      margin-left: auto;

      }

       

      body {

      margin: 0px;

      background-color: #CCC;

      }

       

      #header {

      background-color: #000;

      height: 100px;

      width: 900px;

      margin-right: auto;

      margin-left: auto;

       

      }

       

      #header_nav {

      background-color: #CF0;

      float: right;

      height: 100px;

      width: 450px;

      }

       

       

      Picture 13.png