Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » Align Center tags for image's
Align Center tags for image's [message #358741] Sun, 16 November 2008 19:03 Go to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Hi I'm trying to get our site banner to be in the middle of the page at the top i have tried a lot of different php coding ways to align center but none of them are working.

I have been googlen it for 4 hour's now every one i have tried never aligned it.

Here is the code we are using for the banner
echo "			<img src=\"themes/RD-TheDark/images/hd/logo.jpg\" width=\"628\"height=\"109\" alt=\"\"></td>\n";


So if anyone can help us out that would be great.

Please and Thank you..


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Align Center tags for image's [message #358744 is a reply to message #358741] Sun, 16 November 2008 20:00 Go to previous messageGo to next message
Ethenal is currently offline  Ethenal
Messages: 2532
Registered: January 2007
Location: US of A
Karma: 0
General (2 Stars)

http://www.w3schools.com/Css/pr_pos_vertical-align.asp

Has nothing to do with the PHP at all, just a simple CSS property. Tell Me


-TLS-DJ-EYE-K wrote on Mon, 18 March 2013 07:29

Instead of showing us that u aren't more inteligent than a Toast, maybe you should start becomming good in renegade Thumbs Up

Re: Align Center tags for image's [message #358746 is a reply to message #358741] Sun, 16 November 2008 20:11 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Quote:

Parse error: syntax error, unexpected ':' in /misc/42/000/104/392/6/user/web/dsgaming.us/themes/RD-TheDark/theme.php on line 190


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: Align Center tags for image's [message #358747 is a reply to message #358741] Sun, 16 November 2008 20:20 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
Your help topic has a reply
Re: Align Center tags for image's [message #358749 is a reply to message #358747] Sun, 16 November 2008 20:31 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Zack wrote on Sun, 16 November 2008 21:20

Your help topic has a reply

Your post has a reply
lol had to but i only did one here just encase you guy's couldn't help me there


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Sun, 16 November 2008 20:34]

Report message to a moderator

Re: Align Center tags for image's [message #358750 is a reply to message #358741] Sun, 16 November 2008 21:04 Go to previous messageGo to next message
genetix is currently offline  genetix
Messages: 392
Registered: July 2003
Location: Saskatchewan Canada
Karma: 0
Commander
That type of error in PHP means that you have left the simple echo statement and PHP is trying to interpret your HTML code as PHP. Never a good thing.

Add a slash before the character causing the problem or better yet rework the code.


Re: Align Center tags for image's [message #358758 is a reply to message #358741] Mon, 17 November 2008 00:11 Go to previous messageGo to next message
Goztow is currently offline  Goztow
Messages: 9737
Registered: March 2005
Location: Belgium
Karma: 13
General (5 Stars)
Goztoe
Call me old fashioned, but
echo "<center><img src=\"themes/RD-TheDark/images/hd/logo.jpg\" width=\"628\"height=\"109\" alt=\"\"></center></td>\n";


You can find me in The KOSs2 (TK2) discord while I'm playing. Feel free to come and say hi! TK2 discord
Re: Align Center tags for image's [message #358759 is a reply to message #358741] Mon, 17 November 2008 00:21 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
style="margin: auto;"


Or, to align horizontally only

style="margin: 0 auto;"


http://steamsignature.com/card/1/76561197975867233.png
Re: Align Center tags for image's [message #358780 is a reply to message #358741] Mon, 17 November 2008 08:42 Go to previous message
cheesesoda is currently offline  cheesesoda
Messages: 6507
Registered: March 2003
Location: Jackson, Michigan
Karma: 0
General (5 Stars)

*headdesks repeatedly*

When will people learn that there are forums and tutorials for HTML, PHP, and CSS on the web? I mean, they are so numerous, I can't imagine it being that hard to find a solution to CENTER an image.

If you want the image to be centered, listen to danpaul... except you need to, also, add a clear attribute, so like this:

style="clear:both;margin:auto;"


Then, of course, you're going to need to make it PHP-compatible.


whoa.

[Updated on: Mon, 17 November 2008 08:49]

Report message to a moderator

Previous Topic: How much do you think this pc is worth
Next Topic: New Ren Vid :-p
Goto Forum:
  


Current Time: Fri Nov 08 04:59:51 MST 2024

Total time taken to generate the page: 0.00793 seconds