Posts: 548
Threads: 67
Joined: Jun 2004
why wont this work?
<img src="trypanosoma.gif" align = center>
I'm trying to make this image center align...but it doesnt align at all.
Thanks for help!
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Posts: 2,765
Threads: 138
Joined: Nov 2002
Code:
<center>
<img src="trypanosoma.gif">
</center>
http://www.w3schools.com/tags/tag_img.asp
The align aligns it to text
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Posts: 78
Threads: 0
Joined: Jun 2004
Among other methods.
It is also good form to leave no space for the equals sign and to keep all values in quotation makrs. So instead of align = center it would be align="center", if align was an img attribute at all.
Posts: 780
Threads: 49
Joined: Dec 2001
If you are having compliance problems, then use:
<img src="trypanosoma.gif" align="center" />
Complaince tends towards stuff like positioning to be dictated through CSS.
Posts: 2,404
Threads: 153
Joined: Jan 2005
This always works for me...
Code:
<P ALIGN="CENTER"><IMG SRC="Imagelink" ALT="ImageName"></P>
:wink:
Kevin (
x.t.r.GRAPHICS)
Posts: 780
Threads: 49
Joined: Dec 2001
That's not a very good way to do it unless you've CSS'd your site.
I apologize for my code above, it wasn't fully XHTML 1.0 Strict compliant.
It should be:
<img src="trypanosoma.gif" align="center" alt="imagename" />
I think the W3C complaincy checker will bitch about the align, but as I said, that kind of stuff is meant to be done through CSS.
Posts: 548
Threads: 67
Joined: Jun 2004
thanks guys
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]