Slide 19 of 27

Relative Positioning Example

In this sentence some elements should be higher and some elements should be lower.

Example code:

<style type="text/css">
.mystyle1 {
text-align: center;
margin: 2em }

.higher {
position: relative;
top: -1em;
color: green }

.lower {
position: relative;
top: 1em;
color: purple }
</style>
.....
<p class="mystyle1">In this sentence some elements should be <span class="higher">higher</span> and some elements should be <span class="lower">lower</span>.</p>
....