Приглашаем посетить
Романтизм (19v-euro-lit.niv.ru)

Styling the <div> Element

Previous Page
Table of Contents
Next Page

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;
}

Figure 17.5. Screenshot of styled <div> element.

Styling the <div> Element



Previous Page
Table of Contents
Next Page