+ 1

Align

how do i align this image to the middle of the page when i do it it doesnt work

7th Jul 2017, 8:27 PM
_Legend27_
_Legend27_ - avatar
4 Antworten
+ 16
<body style=margin:0;text-align:center;line-height:100vh> <img src= "http://www.womenofmystery.net/wp-content/uploads/2014/06/hfot_proudsup_400pix.png" alt="Home for Veterans" title="Home for our Troops" height="50px" width="50px"/> </body>
7th Jul 2017, 8:54 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
Or just add css 'display:block; margin:auto;' (and better to define image width and height through css also): <img src= "http://www.womenofmystery.net/wp-content/uploads/2014/06/hfot_proudsup_400pix.png" alt="Home for Veterans" title="Home for our Troops" style="height:50px; width:50px; display:block; margin:auto;"> Anyway, as you can see, I have deleted the ending slash (/) of your <img> tag, as it's non valid in Html5 (even if browsers auto correct it easily due to permissivity mandatory in Html5 specification) ;P
8th Jul 2017, 6:15 AM
visph
visph - avatar
0
<img src= "http://www.womenofmystery.net/wp-content/uploads/2014/06/hfot_proudsup_400pix.png" alt="Home for Veterans" title="Home for our Troops" height="50px" width="50px"/>
7th Jul 2017, 8:27 PM
_Legend27_
_Legend27_ - avatar
0
this is the code
7th Jul 2017, 8:27 PM
_Legend27_
_Legend27_ - avatar