+ 2
How can I set alignment for image?
6 Respuestas
+ 2
You have to use CSS. The align attribute is not supported in HTML5. To center an image, you have to make it into a block element and give it margin auto:
<style>
.centered {
display: block;
margin: 0 auto;
}
</style>
<img class="centered" src="my_img_url"/>
0
Depends on what you want to achieve. Can you tell us more?
0
<img src="" align="left/right/bottom/up">
0
@ZinC
I want to display the image in center of the webpage.
I used
<img src="my_img_url" align="center"/>
but it doesn't work. (the image is in left side yet)
0
I need to know how ?
- 2
<center>
<img src="img_url">
</center>