• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Hour 10. Putting Graphics on a Web Page > Horizontal Image Alignment

Horizontal Image Alignment

As discussed in Hour 5, "Text Alignment and Lists," you can use <div align="center">, <div align="right"> , and <div align="left"> to align part of a page to the center, right margin, or left margin. These tags affect both text and images.

For example, the last <img /> tag in Figure 10.1 occurs between the <div align= "center"> tag and the closing </div> tag. You can see in Figure 10.2 that this causes the image (as well as the text below it) to be centered on the page. Like text, images are normally lined up with the left margin unless a <div align="center"> or <div align="right"> tag indicates that they should be centered or right-justified.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint