Okay, now that you know how to format text on the page, let's include some in-line images. The web supports images in GIF, JPEG or PNG formats. GIFs can have up to 256 colors. JPEGs and positioned element. Also, since it has a transparent background, theparent element's text shows through the positioned element. Theonly way to avoid this is to set a background for the positionedelement.
Note that the boldface element in this case is positioned in relationto its parent element's content box, which defines itscontaining block. Without the relative positioning of the parentelement, the containing block would be another element. Consider acase where the element being positioned is a child of the
Figure 10-3 shows the result of this declaration.

On the other hand, perhaps you wish to make purple any element thatis a descendant of DIV. This would be written:
DIV * {color: purple;}At first glance, this seems no different than if the* were left out, instead relying on inheritance tocarry the color to all descendants ofDIV. However, there is a very real difference: thehandle auto, and not even all of them get it right. Those that do not handle auto margins correctly will behave in inconsistent ways, but the safest bet is to assume that they will set both margins to zero. The browsers that do get this right are Internet Explorer 4.5 and 5 for Macintosh, and Opera 3.6.
In addition, if the document is scrolled, the paragraph will scrollright along with it. This is because the element's containingblock is the BODY element's content area,not the viewport. If you want to position elements so thatthey're placed relative to the viewport and don't scrollalong with the rest of the document, then the next section is foryou.
Before we get there, however, there are a few more things to cover.