In the production of div+css page we often encounter text beyond the fixed height also called content overflow, wait until we finish the entire page when the content added, found that some local text beyond the border content overflow, and even text run out of CSS set border line, the following figure:
First we set the class like this:. STYLE1 {width:150px height:80px;color: #000000; border:1px solid #FF0000}, and the text we do not know how many words we need to just do not exceed the set red border, Results text or pictures larger than the Set box (CSS box) high and wide.
Resolve to keep text beyond the fixed height of the CSS box we just need to add the Overflow:hidden style to this CSS class, and then add the CSS class:. STYLE1 {width:150px; Height:80px;color: #000000; border:1px solid #FF0000; overflow:hidden;} The effect is the following figure:
This way the text will not overflow beyond the set fixed high and wide areas.
Description
Overflow is to retrieve or set how content is managed when the content of the object exceeds its specified height and width.
Overflow syntax:
overflow:visible | Auto | Hidden | Scroll
Overflow parameters:
Visible: Do not cut content nor add scroll bars. If you explicitly declare this default value, the object will be clipped to the size of the window or frame that contains the object. and the Clip property setting will fail
Auto: This is the default value for the body object and textarea. Cut content and add scroll bars when needed
Hidden: Do not display content that exceeds the object size
Scroll: Always show scroll bars