Forum Moderators: open

Message Too Old, No Replies

Make text bigger

         

phpguy54

2:19 pm on Apr 9, 2008 (gmt 0)

10+ Year Member



This is probably a really easy thing to do, but I'm clueless.

How would i make the following output text bigger by using html in the php code?

$output = "Thanks for your interest<br><br> "; 

bodycount

3:03 pm on Apr 9, 2008 (gmt 0)

10+ Year Member



it would be some thing like this

echo "<font size=\"20\"> text in here </font>";

I hope this helps

PHP_Chimp

4:26 pm on Apr 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not really php; but the font tag is depreciated, so you may be better with the following.

echo "<span style="font-size:2em;"> text in here </span>";

Or make your own class and apply it to your text.

penders

9:26 pm on Apr 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I'd certainly go for the class as PHP_Chimp suggests and define this in your stylesheet, in which case your code becomes something like:
echo '<span class="special-text">'.$output.'</span>';

And define your CSS like:

.special-text { 
font-size: larger;
}

However, if you want to keep this as purely HTML then you could always try the <big> tag...?

echo "<big>$output</big>";

Although <big> is not deprecated, it doesn't separate your style and content that an applied class and CSS solution does.