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

Chapter 12. Box Properties > width Property

12.26. width Property

The width property is used to scale an element (typically an image) to the desired vertical length on a Web page. It can take one of three different properties: a unit of measurement value, a percentage value, and the name value auto, which sets the element to its default size. It has a sibling property height, which does the exact same thing, but to vertical length.

The auto setting is used to set an image to its normal size. width can also take a specific measurement value, which sizes the height of the image to the desired value. It can also take a percentage value that sizes the width of the image in relation to the overall width of the browser window. You can see all of these values for width exhibited in Listing 12.20, whose results can be seen in Figure 12-27.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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