


Finally became a member of the bloggers. This is my first blog post. I write about the problem and solution of ul li content width_html/css_WEB-ITnose
Writing a blog post for the first time, let me write about a problem I just encountered.
Regarding ul li, the text length is not fixed, and multiple columns are displayed in one line. When the width is specified, the text length exceeds the specified li width. Solution:
The following code
Send objects (total 10 members)
- tester123456(tester12346@qq.com)
- tester12345(tester12345@qq. com)
- test12345(test12345@qq.com)
- willme(sdfsdf@sdf.com)
- willbin(sdfsd@22f.com)
- zhangsan(zhangsan@qq.com)
- Taobao member_u_865b68p1g7(u_265i54w3n7 @localhost.com)
- test
Style
.menber{width:754px; margin:0px auto;line-height:25px; max-height:200px;}
.menber li{clear:none;width:200px;float:left;height:25px;line -height:40px; margin-right:30px;}
This code displays all member information, three in one line, but now a problem arises, this line
. This can control the width of the text display and can be arranged neatly. However, when there is too much text in the li and exceeds 200px, the content inside It will fall to the lower line, causing it to overlap with the content of the lower line. If you add overflow:hidden; in .menber li, the content will not fall, but the content will be incompletely displayed. What should you do at this time? The best solution The way is not to specify the width, set the width to auto; and add white-space:nowrap; this code can prevent the content from automatically wrapping (when encountering strings such as _). This problem is solved, but because the width is not fixed , so the content display will not be so neat. It is difficult to be perfect in everything. If you have to take into account some, you will lose some. There is no way. If you have a better solution, you can share it.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

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

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...
