1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

add code for font size under php echo code

Discussion in 'PHP' started by newphpcoder, Nov 11, 2010.

  1. newphpcoder

    newphpcoder New Member

    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:
    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
     
  2. shabbir

    shabbir Administrator Staff Member

    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
     

Share This Page