Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use CSS to realize the mixed layout of left and right text

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you how to use CSS to achieve the left and right text mixed layout, I hope you will gain something after reading this article, let's discuss it together!

The code is as follows:

CSS left picture and right text mixed layout

* {

Margin:0

Padding:0

}

H4 {

Font-size:12px

Color:#0066CC

Line-height:2em

}

P {

Font-size:12px

Text-indent:2em

Line-height:1.5em

}

# container {

Width:300px

Margin:0 auto

Margin-top:10px

Padding-right:3px

Border:1px dotted # 666

Position:relative

}

# leftContent {

Position:absolute

Top:4px

Left:4px

}

# leftContent img {

Height:80px

Width:100px

Border:1px solid # ccc

Padding:2px

}

# rightContent {

Margin-left:120px

}

Ten years of friends, a lifetime of wealth.

Ten years, I do not know you, you do not belong to me, through the gradually familiar streets, ten years later, we are friends, we can still greet, but can no longer be found.

After reading this article, I believe you have a certain understanding of "how to use CSS to achieve mixed layout on the left and right". If you want to know more about it, welcome to follow the industry information channel, thank you for your reading!

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report