Monday, August 19, 2013

CSS padding left

<html>
<head>
<style type="text/css">
p.padding {padding-left:2cm}
p.padding2 {padding-left:50%}
</style>
</head>

<body>
<p>This is a text with no left padding.</p>
<p class="padding">This text has a left padding of 2 cm.</p>
<p class="padding2">This text has a left padding of 50%.</p>
</body>
</html>

No comments: