开发者

Style <li> to behave like a <div>

开发者 https://www.devze.com 2023-04-01 08:51 出处:网络
I\'d like to make use of unordered list for many reasons like using drag n drop jquery plugins and other effects like that.

I'd like to make use of unordered list for many reasons like using drag n drop jquery plugins and other effects like that.

The issue i'm facing is that开发者_开发问答 <li> behave oddly when putting stuff in it.. What a robust CSS to make <li> tags behave like <div> tags but still keep the vertical ordering style?


Here's one simple way:

ul, li {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0;
}


use this

li{
display:block;
}

gl

0

精彩评论

暂无评论...
验证码 换一张
取 消