WordPress.org

Ready to get started?Download WordPress

Forums

Insert PHP
[resolved] Changing Font Size using Insert PHP (4 posts)

  1. LesTexas60
    Member
    Posted 6 months ago #

    I am using the code below:

    [insert_php]
    $a= htmlspecialchars($_GET["SendTo"]);
    echo "<p> <font size=4 color=Blue >$a</font></p>";
    [/insert_php]

    The variable prints corectly, the color is correct but no matter what I change the "Size" to, it stays the same.

    Any ideas would be appreciated.

    http://wordpress.org/plugins/insert-php/

  2. catacaustic
    Member
    Posted 6 months ago #

    The <font> tag has been depricated and while it still works, it shouldn't be relied upon for anything that you're doing in the future. Because of this there's a good chacne that the browser is not considering this tag and the very old ways that you're applying the styles to it. I'd guarantee that the CSS Styles set for the <p> tag are over-riding anything that you're placing in the font tag.

    If you want to do it the "correct" way, add an inline style declaration to the <p> tag directly:

    echo "<p style='font-size=12px; color=#0000FF;'>$a</p>";

  3. LesTexas60
    Member
    Posted 6 months ago #

    Thanks Cat.. I think your right about the Style over riding my entries. I added the code you provided to my PHP Input and the color wasn't even recognized like the other code line. This is one of the main obstacles in Joomla and WordPress, the templates Rule and it's very difficult to make exceptions to their rules.

    If I didn't enter this as you suggested, excuse my lack of coding experience. One of the main reason I and I think many others move towards WordPress type web software is because coding is not suppose to be required. While technically this is true, coding is necessary when Plugins are not available or if you want to customize features.
    Thank you for the help.

  4. WillBontrager
    Member
    Plugin Author

    Posted 6 months ago #

    LesTexas60, try colon characters instead of equal characters.

    echo "<p style='font-size:12px; color:#0000FF;'>$a</p>";

    Will

Reply

You must log in to post.

About this Plugin

About this Topic

Tags