Table of Contents
Reply to the discussion (solution)
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
  • Jun 24, 2016 pm 12:03 PM
    lt Multiple float master


    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
  • 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

    Hot AI Tools

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Clothoff.io

    Clothoff.io

    AI clothes remover

    AI Hentai Generator

    AI Hentai Generator

    Generate AI Hentai for free.

    Hot Article

    R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
    2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
    Hello Kitty Island Adventure: How To Get Giant Seeds
    1 months ago By 尊渡假赌尊渡假赌尊渡假赌
    Two Point Museum: All Exhibits And Where To Find Them
    1 months ago By 尊渡假赌尊渡假赌尊渡假赌

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    HTML, CSS and jQuery: Make a button with a floating effect HTML, CSS and jQuery: Make a button with a floating effect Oct 24, 2023 pm 12:09 PM

    HTML, CSS and jQuery: Making a button with a floating effect requires specific code examples. Introduction: Nowadays, web design has become an art form. By using technologies such as HTML, CSS and JavaScript, we are able to add various aspects to the page. Such special effects and interactive effects. This article will briefly introduce how to use HTML, CSS and jQuery to create a button with a floating effect, and provide specific code examples. 1. HTML structure First, we need to

    Is there any way to clear floats? Is there any way to clear floats? Feb 22, 2024 pm 04:00 PM

    Is there any method to clear floats? Specific code examples are required. In web page layout, floats are a common layout method that allows elements to break away from the document flow and be positioned relative to other elements. However, a problem often encountered when using floating layout is that the parent element cannot wrap the floating element correctly, causing the page to have a disordered layout. Therefore, we need to take measures to clear the float so that the parent element can wrap the floated element correctly. There are many ways to clear floats. The following will introduce several commonly used methods and give specific code examples.

    php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

    php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

    Become a Go language master: learning path and practical experience sharing Become a Go language master: learning path and practical experience sharing Mar 04, 2024 am 10:12 AM

    Become a Go language master: Sharing learning paths and practical experience Go language has been favored by developers since its birth. Its simplicity, efficiency, and outstanding concurrency performance have attracted more and more developers to join the learning and application of Go language. ranks. This article will share a learning path to become a master of the Go language. At the same time, combined with practical experience, we will provide some code examples for your reference. Learning path 1. Learn basic knowledge. No matter when learning any language, the first thing to master is the basic knowledge. The basic knowledge of Go language mainly includes data types,

    HTML layout tips: How to use the position attribute for floating element control HTML layout tips: How to use the position attribute for floating element control Oct 21, 2023 am 09:22 AM

    HTML layout skills: How to use the position attribute to control floating elements In web design, layout is a very important part. Through reasonable layout, web pages can be made more beautiful and easy to read, and user experience can be improved. In the process of implementing layout, the control of floating elements is one of the key points. HTML provides the position attribute, through which we can control floating elements. This article will introduce how to use the position attribute to layout floating elements and provide some specific code

    How to play multiple sounds at the same time in win7 system How to play multiple sounds at the same time in win7 system Jul 02, 2023 pm 08:41 PM

    How to play multiple sounds at the same time in win7 system? Today I will share with you how to operate a computer to play multiple sounds at the same time. For example, while listening to music, we want to share short videos sent by friends faster, so how can we make their sounds play at the same time? Let’s take a look at the guide for playing multiple sounds at the same time in win7 system brought by the editor below! Guide to playing multiple sounds at the same time in win7 system 1. Right-click the volume icon in the lower right corner of the desktop and select the playback device, as shown in the figure below: 2. In the opened interface, right-click the speaker and select Properties, as shown in the figure below: 3 . In the opened speaker properties window, switch to the advanced settings interface, then uncheck Allow applications to exclusively control the device, and click

    Create multiple processes using fork() function in C Create multiple processes using fork() function in C Sep 08, 2023 pm 06:17 PM

    In this section, we will see how to create a child process in C language using fork(). We also perform a few different tasks in each process. So in our parent process, we're going to print different values. When fork() is called, it returns a value. If this value is greater than 0, then it is currently in the parent process, otherwise it is in the child process. So we can differentiate processes through this. Sample code#include<stdio.h>#include<unistd.h>intmain(){ intn=fork();//subdivideprocess&

    Guide to CSS image properties: outline and display Guide to CSS image properties: outline and display Oct 25, 2023 am 08:57 AM

    Guide to CSS image properties: outline and displayCSS are an integral part of front-end development, and image properties are also essential. In this article, we will focus on two important concepts about image properties: outline and display. This article will detail their definition, usage, and specific code examples. Overview of outline attribute: The outline attribute is used to create an outline around an element without occupying layout space. it is

    See all articles