This topic is locked

Formatting text in header/footer.php

12/3/2006 11:25:24 AM
PHPRunner General questions
L
larsonsc author

Hello everyone. I'd like to go about first stating that I am very new to PHPRunner, but so far have found it to be a wonderful application that is helping me move forward in my design project much quicker than originally anticipated.
OK, now on to what I need some help with. I am trying to format the text in my header.php and footer.php files. I have tried using font stantements in the files, I have tried adding classes to the styles.css file and formatting the text with a span element, but none of this is working.
Can anyone offer me some insight as to what I have been doing wrong? I sure would appreciate it because the inconsistent text formatting is making me consider dropping the header/footer portion of my app. Thank you in advance for any help you can offer me.
--Shawn

T
thesofa 12/3/2006

Hi

If you wanted to turn text red, you could try

<?php

echo "<font color=red>Hi</font>";

?>



that seems to work.

since the header and footer files are .php files, all the formatting has to be issued via PHP commands. These files than get 'included' into the php files that make up the pages you see, so they have to be php too.

HTH

L
larsonsc author 12/3/2006

Hi

If you wanted to turn text red, you could try

<?php

echo "<font color=red>Hi</font>";

?>



that seems to work.

since the header and footer files are .php files, all the formatting has to be issued via PHP commands. These files than get 'included' into the php files that make up the pages you see, so they have to be php too.

HTH


I've tried using font tags in an echo statement, what happens is that no matter what size I make it in the tag, it either stays at the default size (approx 12pt) or gets so big it fills the width of the screen. I need a little more granularity than this.

<?php

// header.php for KSCR records system

echo "<img src=\"images/kcsr_logo_180.jpg\" width=\"474\" height=\"126\" /><br />";

echo "<font size=\"18pt\">Kansas City Siamese Rescue Online Records System</font><br />";

echo "<hr>";

?>


<?php

// footer.php for KCSR records system

echo "<font size= \"8pt\">Copyright 2006-2007. Kansas City Siamese Rescue Online Records System<br>

All information contained in any report generated by this system is the<br>

property of Kansas City Siamese Rescue, Inc., and is not intended for<br>

distribution to any other party than it was originally intended for.<br>

Medical histories may be distributed to the adopter's veterinarian.</font>";

?>
J
Jane 12/4/2006

Shawn,
you can use HTML code instead of PHP in your header.php and footer.php files:

<?php ?>

<img src="images/kcsr_logo_180.jpg" width="474" height="126" /><br />

<font size="18pt">Kansas City Siamese Rescue Online Records System</font><br />

<hr>


<?php ?>

<font size= "8pt">Copyright 2006-2007. Kansas City Siamese Rescue Online Records System
All information contained in any report generated by this system is the
property of Kansas City Siamese Rescue, Inc., and is not intended for
distribution to any other party than it was originally intended for.
Medical histories may be distributed to the adopter's veterinarian.</font>

L
larsonsc author 12/4/2006

Shawn,

you can use HTML code instead of PHP in your header.php and footer.php files:


Jane,
Thanks for your reply. This unfortunately did not work. I made my header file look like the example you sent me, except for changing to 14pt rather than 18pt. Here is what happened:


As you can see, the font is quite a bit bigger than the expected 14pt I had set. I'm beginning to think I may have to just give up the text aspect of my header.

Alexey admin 12/4/2006

Shawn,
use smaller values for size attribute.

I.e.

<font size="5">Kansas City Siamese Rescue Online Records System</font>



To specify font size in points use style attribute

I.e.

<font style="font-size: 14pt">Kansas City Siamese Rescue Online Records System</font>

L
larsonsc author 12/4/2006

Shawn,

use smaller values for size attribute.

I.e.
To specify font size in points use style attribute

I.e.


Alexy, Thanks so much! This solved the issue. Appreciate your assitance.

L
larsonsc author 12/6/2006

<font style="font-size: 14pt">Kansas City Siamese Rescue Online Records System</font>


Just as a follow-up in case anyone else is trying this, I had more consistent formatting results using the style method above than I did with the regular font-size method.

J
jasteele12 12/16/2006



Just as a follow-up in case anyone else is trying this, I had more consistent formatting results using the style method above than I did with the regular font-size method.


Just a note about not having to drop in and out of PHP that I think a lot of people don't know/user much:
[codebox]<?php

// echo until we reach the ending (in this case EOH; - which must be at the beginning of the line)

echo <<< EOH

<img src="myimage.jpg" width="150" height="25" alt="My Image">
<span style="font-size:18pt;">This a a $php_variable</span> and $another_one
EOH;
$year = date('Y');

// EOF; must be on the beginning of the line also...

echo <<< EOF

<div align="center">This is the footer...</div>

<div class="copy">Copyright $year $author - All rights reserved</div>

EOF;

?>[/codebox]
Really helps for correct markup without having to deal with escaping quotes too <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=13948&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />