Padding-right

Set the padding on the right side of an element. Padding is on the inside of the box model while margins are on the outside. Use padding to move the contents away from the edges of the block.

Syntax
      padding-right: length | inherit ;

length - size of the padding in px, pt, %, em, etc. If a % value is given, this will be based on the width of the containing block.
inherit - inherit from the parent element.

The default value is 0, negative values are not allowed.

Examples:
h1 { padding-right: 5px; }
.emw3class { padding-right: 1em; }

#emw3id { padding-right: 4pt; }

Try it:

This is a sample of text with a CSS border. The padding on each side of an element can be styled together or separately using CSS.

(CSS 1) Browser Support: All major browsers.

“First, make yourself a reputation for being a creative genius. Second, surround yourself with partners who are better than you are. Third, leave them go get on with it” ~ David Ogilvy

Related:

padding-bottom - Bottom padding of an element.
padding-left - Left padding of an element.
padding-top - Top padding of an element.
padding - Shorthand to set all the padding properties.


Copyright © 2013-2022 Emw3.com
Some rights reserved