Front-end small module CSS layout code

Source: Internet
Author: User
Structure Code As follows: < Div Class = "Box" >
< H4 > Title </ H4 >
< DL Class = "Title" >
< Dd > More </ Dd >
</ DL >
< Div Class = "Content" >
Content
</ Div >
</ Div >

CSS code: 1 * { Margin : 0 ; Padding : 0 ; }
2 . Box { Width : 200px ; Position : Relative ; }
3 . Box h4 { Height : 26px ; Background : # F00 ; Line-height : 25px ; }
4 . Title { Position : Absolute ; Top : 1px ; Right : 3px ; Line-height : 25px ; }
5 . Content { Border : 1px solid # ccdff2 ; Overflow : Hidden ; }

note * {margin: 0; padding: 0;} is required, and the position: relative of the box is also required; yes. Otherwise, a problem may occur when you are absolutely positioning "more".
this way, we need to create such a small module, so we can just copy and modify it, you can also use a beautiful background image on H4
I have beautified the image.

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.