Home >Web Front-end >HTML Tutorial >Problems that occur after multiple

  • left floats, please ask for experts_html/css_WEB-ITnose

  • Problems that occur after multiple
  • left floats, please ask for experts_html/css_WEB-ITnose
  • WBOY
    WBOYOriginal
    2016-06-24 12:03:301226browse


    There are 6 25edfb22a4f469ecb59f1190150159c6 under the parent div. All 25edfb22a4f469ecb59f1190150159c6 are unified css. Because of the spacing between 25edfb22a4f469ecb59f1190150159c6, the margin-left is a few pixels, but the arrow is There will also be a gap
    in the pointed place. If the parent div has a border, it will look better. But if the parent div is blank, then the 25edfb22a4f469ecb59f1190150159c6 on the left side will not be moved to the side, which will look ugly. Please tell me how to solve it

    I don’t want to define the li class separately, so it is inconvenient to call the program
    Help


    Reply to the discussion (solution)

    li1 li2 li3
    li4 li5 li6

    1,2,3,4,5,6 with class a
    1,4 with class b

    .a{    margin-left:5px;}.b{    margin-left:0px;}

    li’s parent ul defines a

    margin-left:-你的px值


    Remember ul clearfix

    li’s parent ul defines a

    margin-left:-你的px值


    Remember ul clearfix



    Thank you, I forgot the role of ul, but ul clearfix has not been written before, I will take a look at it again.

    Although I no longer accommodate ie6. But I also want to ask if ul{margin-left:-6px;} ie6 does not support negative values. How to support ie6

    25edfb22a4f469ecb59f1190150159c6The margin-left is set to 0px; ff6d136ddc5fdfeffaf53ff6ee95f185 Just set margin-left or pading0left to the value you want!

    Set margin-left of 25edfb22a4f469ecb59f1190150159c6 to 0px; Set margin-left or pading0left of ff6d136ddc5fdfeffaf53ff6ee95f185 Just set the value you want!


    Where to find the interval between the li's
    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