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

Lesson 17. Styling a Round-Cornered Box > Styling the <div> Element

Styling the <div> Element

The 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> Element

div#pullquote
{
    margin: 2em;
					background: #09f url(lesson17a.gif) no-repeat;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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