html - DIV whitespace removal. Normal techniques not working -


i have "3 block" design working on. entire design vertical-align middle. wanting remove white space between divs.

if set body{font-size: 0px;} looks should, give each child it's own font size. once give more 1 child size, reverts stage 1. i'm not overly keen on method means cannot use em sizing.

i have tried comment out after closing div , before opening.

</div><!-- --><div> 

but time, it's not working either; puzzling.

the other 2 options can think of no close tags html5 supports, sloppy , not correct or use negative margins, again; incorrect , has problems devices/browsers.

does have clean, easy read solution problem?

    html,      body {        height: 100%;      }      html {        display: table;        margin: auto;      }      body {        background-color: #bfbfbf;        width: 1180px;      }      #header {        background-color: #eeeeee;        width: 1180px;        height: 165px;      }      #content {        background-color: #eeeeee;      }      #footer {        background-color: #35363a;        height: 76px;      }      .table {        font-size: 12px;        color: #333333;        border-width: 1px;        border-color: #729ea5;        border-collapse: collapse;      }      .table th {        font-size: 12px;        background-color: #acc8cc;        border-width: 1px;        padding: 8px;        border-style: solid;        border-color: #729ea5;        text-align: left;      }      .table tr {        background-color: #ffffff;      }      .table td {        font-size: 12px;        border-width: 1px;        padding: 8px;        border-style: solid;        border-color: #729ea5;      }      .table tr:hover {        background-color: #ffff99;      }
<div id="header">    <a href="index.php">      <img id="logo" src="./images/logo.png" />    </a>    <div id="navigation">      <ul>        <a href="./index.php">          <li>home</li>        </a>        <a href="./newsletter.php">          <li>newsletter</li>        </a>        <a href="../users/list.php">          <li>user list</li>        </a>        <a href="./admin/index.php">          <li>admin panel</li>        </a>      </ul>    </div>  </div>  <div id="content">    <p>      <br />      <h2></h2>      <br />      <br />        <ol>        </ol>    </p>  </div>  <div id="footer">    <p class="copyright"></p>  </div>

all did add:

p, div, ol {   margin: 0px; } 

and margin gone (look @ snippet below).

but i'm quite sure you'd have more specific selector using * selector not recommended @ all.

    html,      body {        height: 100%;      }      html {        display: table;        margin: auto;      }      p, div, ol {        margin: 0px;      }      body {        background-color: #bfbfbf;        width: 1180px;      }      #header {        background-color: #eeeeee;        width: 1180px;        height: 165px;      }      #logo {} #logout {} #navigation {} ul {} ul li {} ul li:hover {} ol {} .todo {} .wip {} .done {} {} a:visited {} #content {        background-color: #eeeeee;      }      #footer {        background-color: #35363a;        height: 76px;      }      ul {} li {} .copyright {} form {} #newslettercontent {} .table {        font-size: 12px;        color: #333333;        border-width: 1px;        border-color: #729ea5;        border-collapse: collapse;      }      .table th {        font-size: 12px;        background-color: #acc8cc;        border-width: 1px;        padding: 8px;        border-style: solid;        border-color: #729ea5;        text-align: left;      }      .table tr {        background-color: #ffffff;      }      .table td {        font-size: 12px;        border-width: 1px;        padding: 8px;        border-style: solid;        border-color: #729ea5;      }      .table tr:hover {        background-color: #ffff99;      }
<div id="header">    <a href="index.php">      <img id="logo" src="./images/logo.png" />    </a>    <div id="navigation">      <ul>        <a href="./index.php">          <li>home</li>        </a>        <a href="./newsletter.php">          <li>newsletter</li>        </a>        <a href="../users/list.php">          <li>user list</li>        </a>        <a href="./admin/index.php">          <li>admin panel</li>        </a>      </ul>    </div>  </div>  <div id="content">    <p>      <br />      <h2></h2>      <br />      <br />        <ol>        </ol>    </p>  </div>  <div id="footer">    <p class="copyright"></p>  </div>


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -