Issue
I want to center image with HTML. I have my image but am not sure how to do it? I appreciate help. THANKS.
Here's my code:
<img src="image.jpg">
Solution
With the onset of HTML5, you should look to use CSS for image centering. HTMl5 actually depreciated the align tag.
Try the following CSS code instead:
<IMG id="myImage" src="image.jpg" >
<style type="text/css">
#myImage {
display: block;
margin-left: auto;
margin-right: auto }
</style>
Answered By - Viper
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.