Monday 30th of November 2015 07:44:15 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: Y

There are no index entries for this letter.

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y
  Here's an  in-line greyscale image with default settings and unpredicable placement on the page. 

<IMG SRC="ugly2.gif">

If you resize the  browser window the image jumps around as the lines re-wrap.  Here's an in-line greyscale image with default settings and unpredictable placement on the page.  | Z

Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

case where the element being positioned is a child of the BODY element, e.g., a paragraph or heading element. With the right styles, the containing block for the positioned element will be the entire BODY element. Thus, applying the following styles to the BODY and the fifth paragraph in a document would lead to a situation similar to that shown in Figure 9-20:

BODY {position: relative;}
<P STYLE="position: absolute; top: 0; right: 25%; left: 25%; bottom: auto;

The description of offsetting the outer edges is based on an erratum.The original CSS2 specification actuallysays that the content edges are offset, but it has been widely agreedthat this is a serious error, and in fact, readings of other parts ofthe specification show that it is the outer edges that are offset.

The implication of offsetting the outer edges of a positioned elementis that everything about an element -- margins, borders, padding,and content -- is moved in the process of positioning the element. P.neg {margin-bottom: -50px; width: auto; margin-right: 10px; margin-left: 10px; border: 3px solid gray;} <DIV STYLE="width: 420px; background-color: silver; padding: 10px; margin-top: 75px;"> <P CLASS="neg"> A paragraph. </P> </DIV> <P> The next paragraph.

The default value of none means about what you'd expect: no image is placed in the background. If you want a background image, then you need only give this property a URL value:

BODY {background-image: url(bg23.gif);}

Due to the default values of other background properties, this will cause the image bg23.gif to be tiled in the document's background, as shown in Figure sheet, and then link all of your pages to the style sheet, thenyou only have to edit one file in order to change the text colors ofevery last one of your pages. Affecting borders

Thevalue of color can also affect the borders aroundan element. Let's assume that you've declared these