Home  >  Article  >  Web Front-end  >  Solutions to the different performances of ul under Firefox and IE_Experience exchange

Solutions to the different performances of ul under Firefox and IE_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:07:511534browse

I recently made a system template for oblog, which involved ul, so I compiled this article and this big picture.
ul is a very commonly used tag, but because of its different performance under Firefox and IE, it makes people feel that it is a tag that is difficult to control.
Under Firefox, ul has a padding value but no margin value; on the contrary, under IE, ul has a margin value but no padding value. [It can be seen from the comparison of the second and third examples in the figure below]
Under Firefox, the list-style of ul is placed at the outer edge of the content by default. Of course, you can set list-style to the inner edge of the content through css.
By weighing the settings suitable for both browsers: padding:0; margin:0; list-style:inside;. You can also set ul to padding:0; margin:0; list-style:none; and then add a background image to li, which is also a good choice.


[Ctrl A Select all Note:If you need to introduce external Js, you need to refresh to execute]

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