Home >Web Front-end >HTML Tutorial >How to control the maximum width of div? _html/css_WEB-ITnose
I set up a div, hoping that its height will change with the number of words, and its width is fixed. However, the current effect is that the width is also changing. How can I control the width of the div?
Try max-width
Try max-width How to write? I'm not very good at it. .
Try max-width. How to write it? I'm not very good at it. .
<div style="max-width:960px; min-width: 960px;"></div>
How to fix the maximum width of the table?
The setting method is the same. But generally speaking, changing the height or width unilaterally will not affect the other. LZ still needs to check the JS to see
The setting method is the same. But generally speaking, changing the height or width unilaterally will not affect the other. LZ still needs to check the JS to see if it is good
Try setting a forced line break. As long as the specified width is reached, it will Line-wrapped