CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS margin right Property

CSS margin-right Property

 

 

The margin-right property is used to set the right margin of an element. We can use negative values in it.

 

Default Value:-

 

Its default value is 0.

 

Syntax:-

 

Its syntax is:- margin-right: length | auto | initial | inherit;

 

Further Explanation:-

 

Value Description
length Specifies a fixed right margin in px, cm, em, etc.
% Specifies a right margin in percent of the width of the containing element
auto The browser calculates a right margin
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS