How to Position an Image in a DIV
Using the "DIV" HyperText Markup Language tag, you can position images on your Web page. Web developers use the "DIV" HTML tag to format either text or images. The "align" parameter that you can include in your "DIV" tag allows you to align the picture enclosed in the tag either with the right or left side of the screen or at its center. You can position a picture with a "DIV" tag in just a few steps.
Instructions
-
-
1
Launch your favorite HTML editor or a simple text editor such as Notepad and open the HTML file that you wish to edit.
-
2
Place the following piece of code before the "IMG SRC" tag of the picture you wish to align:
<div align=X>
Replace "X" with "left" to position the picture at the left of the screen, "right" to position it at the right or "center" to position it in the middle.
-
-
3
Place the following piece of code after the "IMG SRC" tag:
</div>
-
4
Save your HTML file and upload it to your Web server using your favorite upload method. You can either use your Web host's upload tool or an FTP connection.
-
1