Styling the Image


Finally, the image can be styled with a border.

There are many ways to specify a border around an image. The simplest method is the shorthand border property shown in Listing 11.6 and illustrated in Figure 11.5.

Listing 11.6. CSS Code Styling the Image
div.imagecaption {     float: right;     width: 182px;     margin: 0 1em 1em 1em;     display: inline;     padding: 10px 10px 70px 10px;     background: #036 url(chapter11.gif) repeat-x 0 100%;     color: #fff;     text-align: center; } div.imagecaption img {     border: 1px solid #fff; } 

Figure 11.5. Screenshot of the final result.





Sams Teach Yourself CSS in 10 Minutes
Sams Teach Yourself CSS in 10 Minutes
ISBN: 0672327457
EAN: 2147483647
Year: 2005
Pages: 234
Authors: Russ Weakley

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net