Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
html problem
#1
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]
Reply
#2
Code:
<center>
<img src="trypanosoma.gif">
</center>

http://www.w3schools.com/tags/tag_img.asp
The align aligns it to text
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#3
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.
Reply
#4
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.
·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-
avinash.vora - http://www.avinashv.net
Reply
#5
Smile This always works for me...

Code:
<P ALIGN="CENTER"><IMG SRC="Imagelink" ALT="ImageName"></P>

:wink:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#6
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.
·~¹'°¨°'¹i|¡~æthérFòx~¡|i¹'°¨°'¹~·-
avinash.vora - http://www.avinashv.net
Reply
#7
thanks guys
quote="na_th_an"]
Greenday, Spice Girls... Can you tell the difference?
[/quote]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)