Css dt dl dd instance tutorial

Source: Internet
Author: User
Tags php code

<Dl id = "msgdl">
<Dd>
<Span id = "commentname">
<? Php
Echo $ rs ['gx _ title'];
?>
</Span>
<Span id = "commenttime">
<? Php
Echo $ rs ['gx _ time'];
?>
</Span>
</Dd>
<Dt>
<P id = "commentp">
<? Php
Echo $ rs ['gx _ content'];
?>
</P>
</Dt>
</Dl>

The above is the php code to see the final effect.

The effect is good. Let's take a look at how css is controlled. Let's take a look at how msgdl, commentnam, commenttime, and commentp are defined.

# Commentname {
Line-height: 30px;
Padding: 0 0 0 15px;
Color: #432914;
Background: url (images/nameback.jpg) no-repeat top left;
Height: 36px;
Width: 90px;
Display: block;
}
# Commenttime {
Font-size: 9px;
}
# Showcomment {
Width: Pixel px;
Clear: left;
}

# Commentp {
Height: 60px;
Width: 400px;
Margin: 30px 0 0 0;
Padding: 0 0 0 30px;
Background: url (images/line.jpg) repeat-x bottom left;
}

A careful friend may find that msgdl does not exist, because it is unnecessary to write because we make it a line. Haha.

Original reprinted on this site: www.111cn.net

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.