![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
can any one tell me how to align an image to the centre of the page using xhtml. i've tryed p><img src="my pic" align="middle"/></p the pic still is displayed on the left and not in the centre - im told you cant use the centre tag in xhtml |
#3
| |||
| |||
|
|
"Mark Strain" <markscomp (AT) tesco (DOT) net> wrote in message news:lkwJd.231$iD3.156 (AT) newsfe5-win (DOT) ntli.net... can any one tell me how to align an image to the centre of the page using xhtml. i've tryed p><img src="my pic" align="middle"/></p the pic still is displayed on the left and not in the centre - im told you cant use the centre tag in xhtml I don't know how valid it is for xhtml, but I was trying to do this and only managed it by enclosing the img tag within a p tag, and using text-align:center; on the p with a stylesheet. HTH ps. I would be interested in finding a better way. -- Merlin |
#4
| |||
| |||
|
|
im told there is a way using css - so gone away to try to learn it That's what I did. The html looked thus: |
#5
| |||
| |||
|
|
"Mark Strain" <markscomp (AT) tesco (DOT) net> wrote in message news:k0LJd.255$hv1.176 (AT) newsfe1-win (DOT) ntli.net... im told there is a way using css - so gone away to try to learn it That's what I did. The html looked thus: p class="aligncenter"><img src="...." alt="...."></p And the css looked like this: .aligncenter {text-align:center;} The combination centered the image at the top of the page. -- Merlin |
#6
| |||
| |||
|
|
"Mark Strain" <markscomp (AT) tesco (DOT) net> wrote in message news:lkwJd.231$iD3.156 (AT) newsfe5-win (DOT) ntli.net... can any one tell me how to align an image to the centre of the page using xhtml. i've tryed p><img src="my pic" align="middle"/></p the pic still is displayed on the left and not in the centre - im told you cant use the centre tag in xhtml I don't know how valid it is for xhtml, but I was trying to do this and only managed it by enclosing the img tag within a p tag, and using text-align:center; on the p with a stylesheet. HTH ps. I would be interested in finding a better way. -- Merlin |
#7
| |||
| |||
|
|
I just learned this: float:center; float:left; float:right; float:inherit; img style="float:center;" width=... |
|
"Merlin Fradley" <merlin.fradley (AT) btinternet (DOT) com> wrote in message news:ct795s$r01$1 (AT) sparta (DOT) btinternet.com... "Mark Strain" <markscomp (AT) tesco (DOT) net> wrote in message news:lkwJd.231$iD3.156 (AT) newsfe5-win (DOT) ntli.net... can any one tell me how to align an image to the centre of the page using xhtml. i've tryed p><img src="my pic" align="middle"/></p the pic still is displayed on the left and not in the centre - im told you cant use the centre tag in xhtml I don't know how valid it is for xhtml, but I was trying to do this and only managed it by enclosing the img tag within a p tag, and using text-align:center; on the p with a stylesheet. HTH ps. I would be interested in finding a better way. -- Merlin |
#8
| |||
| |||
|
|
there I go shooting off my mouth too soon again. center is not an option. the others are. Use a P tag. <p align=center></p but be warned that the align attribute is deprecated. I really wish w3c would leave us with something to replace these with. |
#9
| |||
| |||
|
|
I just learned this: float:center; float:left; float:right; float:inherit; |
#10
| |||
| |||
|
|
Jim Michaels wrote: there I go shooting off my mouth too soon again. center is not an option. the others are. Use a P tag. <p align=center></p but be warned that the align attribute is deprecated. I really wish w3c would leave us with something to replace these with. They did, as described elsewhere in this THIRTEEN MONTH DEAD thread you decided to revive. http://groups.google.co.uk/group/alt...b?dmode=source |

![]() |
| Thread Tools | |
| Display Modes | |
| |