Home  >  Article  >  Web Front-end  >  Please tell me how to write width percentage float_html/css_WEB-ITnose

Please tell me how to write width percentage float_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:50:531446browse

Please teach me how to write width percentage float
c9ccee2e6ea535a969eb3f532ad9fe89
li{float:left;width:25%;}
531ac245ce3e4fe3d50054a55f265927
2ed3b7ad17e0e88bccd767f7bd0f655d
818516a2aea8c5412fd444e4ed52d34a25edfb22a4f469ecb59f1190150159c6User detailsbed06894275b65c1ab86501b08a632eb25edfb22a4f469ecb59f1190150159c6User detailsbed06894275b65c1ab86501b08a632eb25edfb22a4f469ecb59f1190150159c6User detailsbed06894275b65c1ab86501b08a632eb 16b28748ea4df4d9c2150843fecfba68
How to make it compatible? Cannot side by side under IE6


Reply to discussion (solution)

<style>  *{margin:0px;padding:0px;}li{float:left;width:25%;}</style><div style="width:100%"><ul ><li>用户详情</li><li>用户详情</li><li>用户详情</li><li>用户详情</li></ul></div>

<style>  *{margin:0px;padding:0px;}li{float:left;width:25%;}</style><div style="width:100%"><ul ><li>用户详情</li><li>用户详情</li><li>用户详情</li><li>用户详情</li></ul></div>


It’s useless, it’s still the same after adding *
User details User details User details
User details
Still can’t be side by side

IE’s margin is not counted
in width, so you need to set margin to 0, and set

where needed. When margin:0px is not added,

IE’s margin is not calculated in width In
, you need to set the margin to 0, and set

where needed. When not adding margin:0px,


I use EMEditor to edit the preview, in IE8 and Firefox But it’s okay...

It’s useless, even adding * is still the same
User details User details User details
User details
Still can’t side by side


Refresh

I really have to give up IE6!

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