html5中,右边的边框太长,我用的solid-right设置的边框,怎么把边框缩短并且居中?

html-css05

html5中,右边的边框太长,我用的solid-right设置的边框,怎么把边框缩短并且居中?,第1张

这个效果一般不用边框来设置的,而是用一个标签或者竖线来实现的

<style>.nav span{ display:blockheight: 20pxwidth: 1pxbackground: #333}</style>

<ul class="nav">

<li><a href="">a</a></li>

<li><span></span></li>

<li><a href="">b</a></li>

</ul>

<!-- 或者 http://www.hi-docs.com/css.html-->

<ul class="nav">

<li><a href="">a</a></li>

<li><span>|</span></li>

<li><a href="">b</a></li>

</ul>

div 要设高度

DIV 不像表格那样 同一行按高度最大的 单元格 为标准

你给左右两边的DIV 设个高度 你就会看出问题所在了。

<div style=" border-top:1px #ccc solidborder-bottom:1px #ccc solidtext-align:centeroverflow:hidden">

<div style="float:leftwidth:100pxborder-left:1px #ccc solidheight:100%padding-bottom: 1000pxmargin-bottom: -1000px">dasdbebebebe</br>dsadasdasd</div>

<div style="float:leftwidth:300pxborder-left:1px #ccc solidheight:100%">bebebebe</br>dsadasdasdbebebebe</br>dsadasdasdbebebebe</br>dsadasdasd</div>

<div style="float:leftwidth:100pxborder-left:1px #ccc solidheight:100%padding-bottom: 1000pxmargin-bottom: -1000px">dasdbebebebe</br>dsadasdasd</div>

<div style="clear:both"></div>

你试试 应该是可以的 刚写的 可读性不是很好