Many times we would need to set margin for our objects. margin-right will set the right margin of the object. | ||||||||||||||||||
Usage: | ||||||||||||||||||
margin-right: 10px; margin-right: 10pt; margin-right: 10%; margin-right: auto; |
||||||||||||||||||
It takes the following values: | ||||||||||||||||||
|
||||||||||||||||||
The following CSS code example shows how to set the value of the right margin: | ||||||||||||||||||
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”> <HTML> <HEAD> <TITLE>CSS Mragin example</TITLE> <style type=”text/css”> .rightmargin { margin-right: 10cm } </style> </head><body> <p> This paragraph does not have a specified margin. </p> <p class=”rightmargin”> This paragraph has a right margin of 10cm. </p> </body> </html> |
||||||||||||||||||
Click example to view the page produced by above code. | ||||||||||||||||||
CSS Margin Properties | ||||||||||||||||||
|
||||||||||||||||||