In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you the "CSS three-column layout how to achieve", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to achieve the three-column layout of CSS" this article.
The principle of implementation:
The middle column is adaptive, and if we set all three parts to float to the left, then left and right will be squeezed into the next line, so we need to solve this problem. We set the margin-left of both left and right to negative values, and set the padding-left and padding-right of the parent element to make room for the left and right columns. Finally, you need to set the left and right settings to position them, and set their left and right properties.
The specific code is as follows:
CSS implements a three-column layout-(yisu.com) # main {padding-left: 220px; padding-right: 220px;} # left {float: left; width: 200px Height: 300px; background-color: pink; margin-left:-100%; position: relative; left:-220px;} # center {float: left Width: 100%; height: 300px; background-color: red;} # right {float: left; width: 200px; height: 300px Background-color: yellow; margin-left:-200px; position: relative; right:-220px } these are all the contents of the article "how to achieve the three-column layout of CSS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.