开发者

Text larger that rest in php code

I have some php code to display items from a database. It all works fine and i have styled it to how i need it but within my code the word 'COMMENTS' is displayed larger than the rest. Ive played around with the code but ir either displays a error message or adds more text to the larger text

<div class='entry'>
<span class='link'>
    <?php echo $row['title']; ?><br/> 
    <?php echo $row['message']; ?><br/> 
    <?php echo $row['author']; ?><br/>
    <?php $row['posted'] = date("jS M Y h:i",$row['posted']); echo $row['posted']; ?><br/>
    <?php echo "<a href='msg.php?id=$row[id]'/> Comme开发者_开发知识库nts $row[replies]</a>" ?><br/>
    <?php echo "Likes: " . $row['votes_up'] . " "; echo "Dislikes: " . $row['votes_down'] . "<br />"; ?> 
</span>

It is displayed in row five 'Comments'

Ive tried adding echo etc and i can work it out

style...

.entry {
width: 500px;
color: black;
background: white;
padding:8px;
border:1px solid white;
margin:5px auto;
-moz-border-radius:8px;

}

span.link a {
font-size:150%;
color: #000000;
text-decoration:none;

}

Text larger that rest in php code


As I presumed, the anchor is the benefactor. Your style:

span.link a {
  font-size:150%;   /* offending style sheet */
  color: #000000;
  text-decoration:none;
}

either change that, create a new class for the anchor, or be more specific on the CSS selector for this exception.


PHP doesn't style text. The CSS in your page does. Use something like Firebug to examine the comment text and it'll tell you WHERE the font-size override is coming from.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜