Jump to content

Unknown Space


SyntaxPro

Recommended Posts

<!DOCTYPE HTML>
<html>
  <head>
    <title>oddim</title>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <link rel="shortcut icon" href="graphics/favicon.ico">
    <style type="text/css">
      body
      {
        margin: 0px;
        padding: 0px;
        background-color: #DDDDEE;
        font-family: Arial;
      }
      div.main
      {
        margin: 10px auto 0px auto;
        width: 648px;
        height: 294px;
      }
      div.menu
      {
        display: inline-block;
        margin: 0px 0px 2px 6px;
        width: 564px;
        height: 30px;
        background-image: url('graphics/menu.png');
        font-size: 20px;
        font-weight: bold;
        color: #FFFFFF;
        vertical-align: 12.5px;
      }
      div.box_1
      {
        display: inline-block;
        margin: 0px 0px 3px 0px;
        width: 342px;
        height: 229px;
        background-image: url('graphics/box_1.png');
      }
      div.box_2
      {
        display: inline-block;
        margin: 0px 0px 3px 6px;
        width: 300px;
        height: 229px;
        background-image: url('graphics/box_2.png');
      }
      div.bar_1
      {
        display: inline-block;
        width: 342px;
        height: 22px;
        background-image: url('graphics/bar_1.png');
      }
      div.bar_2
      {
        display: inline-block;
        margin: 0px 0px 0px 5px;
        width: 300px;
        height: 22px;
        background-image: url('graphics/bar_2.png');
      }
      img.logo
      {
        display: inline-block;
        margin: 0px 0px 2px 0px;
      }
    </style>
    <script type="text/javascript">
    </script>
  </head>
  <body>
    <div class="main"><img class="logo" src="graphics/logo.png"><div class="menu">E-Mail:</div><div class="box_1"></div><div class="box_2"></div><div class="bar_1"></div><div class="bar_2"></div></div>
  </body>
</html>

Link to comment
Share on other sites

It's kind of hard to explain, but basically, the top margin of the child element pushes outside of the parent element, instead of on the inner edge of the parent element. This means that instead of pushing the child element down, it actually pushes the parent element down. The end effect is that the child element is pushed down according to the amount specified in it's upper margin, but the unexpected effect is that it also brings the parent element down that much.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.