Css Image and Text arrangement

Source: Internet
Author: User

Today, let's take a look at how the image uses div to arrange multiple rows and columns, as shown in the following figure.

The code is as follows: Copy code

<Div id = "firstContent1">
<Div id = "AnLiLeft" class = "floatLeft">
      
<Div class = "AnLiPic">
<Div> <a href = "" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "" target = "_ blank" title = "Changsha Hengtong maternal and child supplies Co., Ltd."> Changsha Hengtong maternal and child supplies Co., Ltd. </> </div>
</Div>
      
      
<Div class = "AnLiPic">
<Div> <a href = "" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "" target = "_ blank" title = "Chinese enterprise website building platform"> Chinese enterprise website building platform </a> </div>
</Div>
      
      
<Div class = "AnLiPic">
<Div> <a href = "/" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "/" target = "_ blank" title = "Changsha New Painting good Optoelectronics Co., Ltd."> Changsha New Painting good Optoelectronics Co., Ltd. </ a> </div>
</Div>
      
      
<Div class = "AnLiPic">
<Div> <a href = "/" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "/" target = "_ blank" title = "Changsha Jiacheng Industrial Co., Ltd."> Changsha Jiacheng Industrial Co., Ltd. </ a> </div>
</Div>
      
      
<Div class = "AnLiPic">
<Div> <a href = "http://www.haihuigm.cn" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "http://www.haihuigm.cn" target = "_ blank" title = "Hunan Haihui Industry & Trade Co., Ltd."> Hunan Haihui Industry & Trade Co., Ltd. </ a> </div>
</Div>
      
<Div class = "AnLiPic">
<Div> <a href = "http://www.hnyzgg.com.cn/" target = "_ blank"> </a> </div>
<Div class = "AnLiText"> <a href = "http://www.hnyzgg.com.cn/" target = "_ blank" title = "Changsha art exhibition Advertising Co., Ltd."> Changsha art exhibition Advertising Co., Ltd. </> </div>
</Div>
       
</Div>

Now let's see how css is defined.

The code is as follows: Copy code

# FirstContent1 {
Margin: 0px 2px 2px;
Height: 249px! Important;
Height: 248px;
Background: # F2F2F2;
 }

# AnLiLeft {
Width: 520px;
Height: 100%;
 }
. AnLiPic {
Margin: 10px 0px 0px 15px;
Border: 1px solid # ccc;
Float: left;
 }

I will not talk about other things in this simple way. I only declare that the original article on this site is reprinted, please note: www.111cn.net/cssdiv/css.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.