Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Issue centering echo output statement
Old 02-12-2009, 01:50 PM Issue centering echo output statement
Novice Talker

Posts: 5
Trades: 0
Is there a way to align the echo <pre>$message</pre> to the center of the page its posting to?? Code below only centers the first echo.

Here is that part of the code I'm using
<?
}
else {
echo "<p align=center>Your Mail Was Processed</P>\n";
echo "<p align=center><pre>$message</pre></p>";
}
?>
Spalmere is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-12-2009, 03:52 PM Re: Issue centering echo output statement
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.webmaster-talk.com/css-fo...r-website.html

It also works for individual elements
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-12-2009, 04:30 PM Re: Issue centering echo output statement
Novice Talker

Posts: 5
Trades: 0
Thanks for the link. I actually was able to get it to center just by changing

echo "<p align=center><pre>$message</pre></p>";

to

echo "<pre><p align=center>$message</pre></p>";
Spalmere is offline
Reply With Quote
View Public Profile
 
Old 02-12-2009, 04:41 PM Re: Issue centering echo output statement
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Quote:
Originally Posted by Spalmere View Post
Thanks for the link. I actually was able to get it to center just by changing

echo "<p align=center><pre>$message</pre></p>";

to

echo "<pre><p align=center>$message</pre></p>";
That is some really bad coding.

Use the link provided by chrishirst to align something in the center correctly (and don't use the code you have used above or google may badlist you - where you website does not validate and could not inaccessible to it's users).
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE

Last edited by rogem002; 02-12-2009 at 04:42 PM..
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 02-12-2009, 07:36 PM Re: Issue centering echo output statement
Novice Talker

Posts: 5
Trades: 0
Thanks for the criticism rogem002. I must admit both bad & old coding but at this moment it works much better than the auto webformmailer or gdform on godaddy's server. Used it quite some time ago with another web site and never really changed to the newer more advanced coding. I am using the link posted by chrishirst and also looking to update my coding.
Spalmere is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Issue centering echo output statement
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23195 seconds with 12 queries