Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   add code for font size under php echo code (http://www.go4expert.com/forums/add-code-font-size-php-echo-code-t23838/)

newphpcoder 11Nov2010 12:47

add code for font size under php echo code
 
Good day!
I have a pure php code, so my table was in echo and I want to change the font and font-size of text in table header but when I put thid code:
PHP Code:

echo "<font size="18" face='Arial'>";
echo 
"<table>";
and 
at the lower part i close it
echo "</table>";
echo 
"</font>"

It only take effect in the text outside the table. and when I try to put it on the <table> It doesn't take effect.
Thank you in advance

shabbir 11Nov2010 12:58

Re: add code for font size under php echo code
 
First you have to understand the basic of HTML here.

If you have 2 tags with needed property defined the one inner will have the effect but if they don't have any properties defined the one outside's effect will be applied.

Simple example is

<A href="#">Some Link</A> - Let us say this is blue link. Now you want the link to be red.
you can do it in 2 ways lets say
<A href="#"><span classs="red">Some Link</span></A>
<span classs="red"><A href="#">Some Link</A></span>

Both will not have the same effect.

First one will be red but not the second one.

Similarly in your case as well.

Best way is to style your Table but if you have many tables you can style with CSS


All times are GMT +5.5. The time now is 14:21.