Book HomeCascading Style Sheets: The Definitive GuideSearch this book Saturday 20th of December 2014 01:12:56 PM

Copyright © 2000 O'Reilly & Associates, Inc. All rights reserved.

Printed in the United States of America.

Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.

Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a koala and the topic of HTML and XHTML is a trademark of O'Reilly & Associates, Inc.

While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

overlaps the some of the content. There is no way to avoid this,short of positioning the boldfaced text outside of the paragraph (byusing a negative value for right) or by specifyinga padding for the paragraph that is wide enough to accommodate thepositioned 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 relation

SELECT {color: rgb(33%,33%,33%);}
Figure 6-11

Figure 6-11. Setting color on form elements

You could also set the foreground color of INPUTelements, although as we can see in Figure 6-12,this would have the effect of setting that color on all inputs, fromtext to radio-button to checkbox inputs:

SELECT {color: rgb(33%,33%,33%);}INPUT {color: gray;}
Figure 6-12

Figure 6-12. Changing form element foregrounds

However, all of this is true only for the top and bottom sides ofinline elements; the left and right sides are a different storyaltogether. We'll start by considering the simple case of asmall inline element within a single line, as depicted in Figure 7-22.

Figure 7-22

Figure 7-22. A single-line inline element with a left margin

Here, if we set values for the left or right margin, they will bevisible, as Figure 7-23 makes obvious: