O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Relative Positioning

In addition to absolute positioning, you can use relative positioning. When you use relative positioning, elements are positioned relative to the location they would have had in the normal flow of elements in the Web browser.

To position items in a relative way, you set the position property to relative. You can also set the other properties to indicate the new relative position. In this example, I'm moving some text—the word Verus—up 5 pixels from the normal position at which the browser would place this text with a new element, <SUP>. I'm using a STYLE attribute to set the relative position:

Listing . ch09_23.xml
 <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/css" href="ch09_02.css"?> <DOCUMENT> <TITLE>The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required