+ 10
How to align an image?
the title says it all how?
8 Answers
+ 10
Strictly, alignement is done by setting the 'text-align' css property of the element container ( the block containing the image, the parent tag element of the <img> one ), as default behavior of <img> html element is to be treated as text content ( inlined with, in the text stream ).
On the other hand, the 'float' css property of an element define another kind of alignement ( only right and left, not center contrarly to 'text-align' ), with the behavior of retrieving the element from the normal stream, align it on a side of the container, and let the normal stream wrap around the element ( allowing text to side next to the image on many lines, instead having the image height imposing the line-height to the text content ^^ ).
+ 15
inside <p> tag, Lol
+ 13
...the bane of css's existence...
+ 11
right sorry i havent reached that lesson yet i was about to study that lesson now XD anyways thanks
+ 10
So is there a way or no?
+ 5
Thanks!
+ 2
float: left/right
+ 1
but u can take your img into P after p give style display in-line block and align center if u want to have it in center but most comfortable use margin