Home > Web Front-end > HTML Tutorial > The pictures and text in li are not aligned with div css, solution_html/css_WEB-ITnose

The pictures and text in li are not aligned with div css, solution_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:28:17
Original
1512 people have browsed it

    li> I’m making my debut, I’m not familiar with my place of birth, please give me some advice I’m not familiar with it, please give me some advice >

    <style>li{    margin: 2px 3px 3px 8px;    padding: 5px;    background: url(/images/sider_siteinfo.gif) no-repeat 0 50%;    list-style-type: none;    list-style-position: inside;}</style><div><ul>  <li> 小弟,出道,人生地不熟,请各位指教</li>  <li> 小弟,出道,人生地不熟,请各位指教</li>  <li> 小弟,出道,人生地不熟,请各位指教</li>  <li> 小弟,出道,人生地不熟,请各位指教</li>  <li> 小弟,出道,人生地不熟,请各位指教</li></ul></div>
    Copy after login

    50% means vertical centering!

    Control the spacing between the image and the content in LI
    1. Add to increase the spacing
    2. Padding-left to control the spacing between the image and the content in LI: