Home >Web Front-end >HTML Tutorial >Adding a border will move the content down_html/css_WEB-ITnose

Adding a border will move the content down_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:12:592127browse

When there was no border, the content inside just filled the div.
But after adding the border, the content inside was offset by half of the foot height!
I tested it and it was (margin- top:15px;
border-bottom:1px;) There is a problem here, please tell me how to modify it!
#foot{
width:100%;
height:43px;
margin-top:15px;
border-bottom:1px;
border-bottom-style:solid;
border-top:1px;
border-top-style:solid;
background-color:#996699;
}
.zi{
text-align:center;
color:#646464;
}

fd9ecc7ce66028f4da6beb5f152b47ae
937cd0c3b63a7d603af82db581050d54Copyright @2006 Your Company | All rights reserved2a87851f231f0546ed00aa1a4409038e
Design by b43a0b0251e1119e819456d1e9ac089bGerhard Studios5db79b134e9f6b82c0b36e0489ee08ed | b43a0b0251e1119e819456d1e9ac089bW3C XHTML 1.15db79b134e9f6b82c0b36e0489ee08ed | b43a0b0251e1119e819456d1e9ac089bW3C CSS 2.05db79b134e9f6b82c0b36e0489ee08ed
94b3e26ee717c64999d7867364b1b4a3
16b28748ea4df4d9c2150843fecfba68


Reply to discussion (Solution)

<div id="foot">        <div class="zi">            Copyright @2006 Your Company | All rights reserved<br>            Design by <a href="ss.html">Gerhard Studios</a> | <a href="ss.html">W3C XHTML 1.1</a>            | <a href="ss.html">W3C CSS 2.0</a>        </div>    </div>

Replace the p element with div

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn