In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "how to set the div height of html". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Html sets div height by adding "height: height value;" style setting fixed height to div element; 2, adding "min-height: height value;" style setting minimum height to div element; 3, adding "max-height: height value;" style setting maximum height to div element.
The operating environment of this tutorial: windows7 system, CSS3&&HTML5 version, Dell G3 computer.
Html sets div height
1. Use the height attribute
The height property sets the height of the element. (note: the height property does not include padding, borders, or margins! )
Div {border: 1px solid red;} default div height is determined by text height setting div width to 100px
2. Use the min-height attribute
The min-height property sets the minimum height of the element.
Div {border: 1px solid red } default div height is determined by text height setting div minimum height for 100px setting div minimum height for 100px setting div minimum height Set div minimum height for 100px set div minimum height to 100px Set div minimum height to 100px, set div minimum height to 100px
When there is no content, or when the content height is less than 100, the height of the div is displayed in the 100px
When content height is greater than 100, div height is determined by text height.
3. Use the max-height attribute
The max-height property sets the maximum height of the element.
Div {border: 1px solid red } the default div height is determined by the text height. Div Max height is set to 100px. Div Max height is set to 100px. Div Max height is 100px.
This is the end of the content of "how to set the div height of html". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.