<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