• 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 <p> Element

Styling the <p> Element

The <p> element must be padded on both sides to keep it away from the edges of its container. This can be achieved using padding: 0 20px as shown in Listing 17.5. The results can be seen in Figure 17.7.

Listing 17.5. CSS Code for Styling the <p> Element

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

div#pullquote h2
{
    margin: 0;
    padding: 20px 20px 0 20px;
    background: url(lesson17b.gif) no-repeat 100% 0;
}

div#pullquote p
{
    padding: 0 20px;
}


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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