Styling the <div> ElementThe first step in creating a round-cornered box is to style the <div>, which needs to be given some space on all sides. This can be achieved using margin: 2em. Next, the <div> needs to have a background image applied to the top-left corner. Use background: #09f url(lesson17a.gif) no-repeat; as shown in Listing 17.3. The results can be seen in Figure 17.5. Listing 17.3. CSS Code for Styling the <div> Elementdiv#pullquote { margin: 2em; background: #09f url(lesson17a.gif) no-repeat; } Figure 17.5. Screenshot of styled <div> element. |