Problems that occur after multiple
  • left floats, please ask for experts_html/css_WEB-ITnose
  • WBOY
    Release: 2016-06-24 12:03:30
    Original
    1208 people have browsed it


    There are 6

  • under the parent div. All
  • are unified css. Because of the spacing between
  • , 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
  • 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;}
    Copy after login

    li’s parent ul defines a

    margin-left:-你的px值
    Copy after login
    Copy after login


    Remember ul clearfix

    li’s parent ul defines a

    margin-left:-你的px值
    Copy after login
    Copy after login


    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

  • The margin-left is set to 0px;
      Just set margin-left or pading0left to the value you want!

      Set margin-left of

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


        Where to find the interval between the li's
  • Related labels:
    source:php.cn
    Statement of this Website
    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
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template