How to Align Wrapped Bullet List Items with Their First Line?
Dec 04, 2024 am 12:56 AMAligning Second Line of Bullet Item with First Line
When a bulleted list item spans multiple lines, it's often desirable to have the wrapped lines align with the first line, rather than appearing underneath the bullet.
Solution:
To achieve this alignment, divide the bullet into a separate div and wrap both the bullet and the text in a container div:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
1 2 3 4 5 6 7 8 |
|
In this example:
- The container-div provides additional padding to create a margin for the bullet.
- The bullet is positioned absolutely within container-div using position: absolute.
- The text is placed in the row2 div within container-div.
This approach ensures that the wrapped lines of the bulleted item are aligned with the first line, as desired.
The above is the detailed content of How to Align Wrapped Bullet List Items with Their First Line?. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Adding Box Shadows to WordPress Blocks and Elements

Create a JavaScript Contact Form With the Smart Forms Framework

Create an Inline Text Editor With the contentEditable Attribute

Demystifying Screen Readers: Accessible Forms & Best Practices

Making Your First Custom Svelte Transition

Comparing the 5 Best PHP Form Builders (And 3 Free Scripts)

File Upload With Multer in Node.js and Express
