• Notice regarding image hosts and attachments. See here.

Span problem

Soldato
Joined
25 Mar 2004
Posts
2,885
Location
Iwade, Kent
Hey Chaps,

Im trying to centre an image on my website using the following:

Code:
<span align=center><img src="blah.jpg"></span>

It isn’t working though, can anyone see any obvious mistakes with that?
 
Span is an inline element, what you want to do is put your image within a div and set text-align:center on that :).
 
<span> is a tag with no real meaning, used inline - so, for example, if you want to apply styles to text in a paragraph:

Code:
<p>Hello, what a nice day. The grass is <span style="color:green">green</span>.</p>

:)
 
Last edited:
Back
Top Bottom