Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Absolute Positioning

You can use the position property to set the position of elements in a Web page. I'll take a look at positioning items in absolute terms in this section and in relative terms in the next section. Here are the properties you commonly use when working with positioning:

  • position— Can hold values such as absolute and relative

  • top— Specifies the offset of the top of the element

  • bottom— Specifies the offset of the bottom of the element

  • left— Specifies the offset of the left edge of the element

  • right— Specifies the offset of the right edge of the element

In this example, I'll set the absolute position of the image we used in the previous example so that it's directly on top of the text:

Listing . ch09_22.css
 TITLE {display: block; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book