Home > Article > Web Front-end > What other tags can be used within the li tag? _html/css_WEB-ITnose
<ul> <li class="msgcont" id="msgcont<?php echo $rows["Id"] ?>"> <b>IP:</b><?php echo $rows["lastip"] ?> <b>位置:</b><?php echo $rows["address"] ?> </li> </ul>
0fdcc53ee06457e7271b8f1a1b0293aca4b561c25d9afb9ac8dc4d70affff419IP :0d36329ec37a2cc24d42c7229b69747a95abdbbdb8c336a8f3a3dc3e1afdc3bc54bdf357c58b8a65c66d7c19c8e4d114
For standard browsers:
<style type="text/css" >ul li span { display:inline-block; width: 140px;} </style> <ul><li> <b>IP:</b><span>1.1.1.1</span><b>位置:</b></li><li> <b>IP:</b><span>255.255.255.255</span><b>位置:</b></li> </ul>
<style type="text/css" >ul li span { float:left; width:200px;} </style> <ul><li><span> <b>IP:</b>1.1.1.1</span><b>位置:</b>ss</li> <li> <span><b>IP:</b>255.255.255.255</span><b>位置:</b>ss</li> </ul>
Use span tag, its width attribute can limit the length