mark on its line — because you specified that the p.csspercentstyle had
a 20 percent value for its margin-rightproperty. You can see these effects
in Figure 6-2:
This next example shows how to use the CSS margin-rightand margin-
leftproperties with percentages:
<html>
<head>
<style>
p.leftside {margin-right: 50%}
p.rightside {margin-left: 50%}
</style>
</head>
<body>
here’s some ordinary body text that goes the full distance
across the browser window, then wraps to
the next line down.
<br>
<br>
<p class=”leftside”>
here’s some ordinary paragraph text that stops half way
across the browser window, then wraps to the
Figure 6-2:
Setting a
table’s width
property to
80 percent
has the
same effect
as setting
a CSS
margin-
right
property to
20 percent
— all else
being equal.
112 Part II: Looking Good with CSS