IE6下margin-bottom设置负数被隐藏的问题_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:55:19
Original
1293 people have browsed it

想这几一个选项卡,想要的效果如下

 

可是在IE6中当前选项卡的底边框不会盖住父级元素的底边框,网上说父级元素要出发haslaytout,试了都不行,最后在选项卡元素中同时设置 margin-bottom:-1px; position:relative; 这样才解决问题。

这里要注意的是:选项卡元素的高度必须必父级元素高度大1px。

我的代码如下:

<ul class="tabs">        <li class="tab cur"><a href="?id=435">?????? ???????</a></li>        <li class="tab "><a href="?id=434">????????????</a></li>    </ul>
Copy after login

  

ul.tabs{display:block; padding:0 10px 0 0; margin:25px 0 0 0; height:35px; border-bottom:solid 1px #ccc; line-height:35px;}ul.tabs li{display:block; float:right; padding:0 10px; margin:0; list-style:none;}ul.tabs li.cur{ border:solid 1px #ccc; border-bottom-color:#fff; background-color:#fff; height:34px; margin-bottom:-1px; position:relative;}
Copy after login

  

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!