Jump to content
  • 0

Проблема margin


HQ_Maker
 Share

Question

Здрасти всем, у меня возникла проблема в margin, прощу помощь.

Вот html страница


<body>

<div id="center">
<div id="logo"></div>


<div id="leftbar">
тесттттттттттттттттттттттттттттт
</div>




<div id="rightbar">
<div id="panel">Панел</div>
<table>
<tr><th>#</th><th>тест</th><th>тест</th></tr>
<tr><td>1</td> <td>тест</td> <td>1111</td></tr>
<tr><td>2</td> <td>тест</td> <td>26.02.1992</td></tr>
<tr><td>3</td> <td>тест</td> <td>08.05.1992</td></tr>
<tr><td>4</td> <td>тест</td> <td>17-18.05.1992</td></tr>
<tr><td>4</td> <td>тест</td> <td>03-06.04.1993</td></tr>
<tr><td>6</td> <td>тест</td> <td>19.06.1993</td></tr>
<tr><td>7</td> <td>тест</td> <td>23.07.1993</td></tr>
<tr><td>8</td> <td>тест</td> <td>18.08.1993</td></tr>
<tr><td>9</td> <td>тест</td> <td>23.08.1993</td></tr>
<tr><td>10</td> <td>тест</td> <td>30-31.08.1993</td></tr>
<tr><td>11</td> <td>тест</td> <td>29-30.10.1993</td></tr>
</table>
<img src="css/xerite.jpg" width="183" height="140" border="1" alt="map" vspace="7"><br/>
<div id="panel">Панель 2</div>
</div>



<div id="content">
tesssssssssssssssssssssssssssst
</div>

<div id="footer">
test
</div>

</div>


</body>

и css

body {
background: url('2.png') repeat-x;
margin: 0 auto;
width: 1204px;
}
div#logo {
background: url('1.jpg') no-repeat;
width: 1200px;
height: 200px;
margin: 0 auto;
}
div#center {
background-color: red;
border-left: 2px solid black;
border-right: 2px solid black;

}
div#leftbar{
background: #CCFFFF;
border: 1px dotted black;
margin: 4px 0 0 4px;
padding: 2px 4px 0 4px;
border-radius: 8px 8px 8px 8px;
float: left;
width: 185px;

}
div#rightbar{
background: #CCFFFF;
border: 1px dotted black;
margin: 4px 4px 4px 0px;
padding: 2px 4px 0 4px;
border-radius: 8px 8px 8px 8px;
float: right;
width: 185px;
}
div#content{
background: #FCFCFC;
border: 1px dotted white;
margin: 4px auto;
padding: 0 10px 0 10px;
border-radius: 6px;
width: 770px;
overflow: hidden;
}
div#footer{
background: url('footer.png') repeat-x;
height: 28px;
margin-top: 5px;
padding: 8px 0 0 8px;
clear: both;
}
div#panel{
background: #0273B1;
border: 1px solid black;
border-radius: 10px 0 10px 0;
margin: 0 auto;
width: 180px;
height: 25px;
font-family: Georgia1, Georgia, serif;
font-size: 17px;
text-align: center;
color: white;
padding-top: 5px;

}
table,td, th {
border: 1px solid #0273B1;
text-align: center;
}
table{
margin: 5px auto;
border-collapse:collapse;
font-size: 15px;
width: 183px;
}

th{
background-color:red;
}
td{
color: red;
}

У меня такая проблема, на div#footer стоить margin-top:5px; но div#footer не отталкиваеться от div#rightbar. А когда на div#rightbar стоить margin-bottom:5px; тогда footer отталкиваеться вниз. По дизайну div#footer стоить после div#rightbar, а по html коду div#footer стоить после div#content

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • 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. See more about our Guidelines and Privacy Policy