Home >Web Front-end >CSS Tutorial >Using margin-right property in CSS
margin-right Specifies the right margin of the element. Its value can be length, %, or auto. You can try running the following code to set the right margin -
<html> <head> </head> <body> <p style = "margin-right: 10px; border:2px solid red;"> This is a paragraph with a specified right margin </p> <p style = "margin-right: 10%; border:2px solid green;"> This is another paragraph with a specified right margin in percent </p> </body> </html>
The above is the detailed content of Using margin-right property in CSS. For more information, please follow other related articles on the PHP Chinese website!