live chat software for live support and live help Online chat software for website

Live chat software

Browser based operator console
Articles

Webtools > CSS tutorials > CSS padding

CSS padding

CSS padding properties define the space between the element border and the element content.

If four values are given, they apply to top, right, bottom, and left padding, respectively.

If one value is given, it applies to all sides. If two or three values are given, the missing values are taken from the opposite side.

Length Unit:

A length value is formed by an optional + or -, followed by a number, followed by a two-letter abbreviation that indicates the unit.

There are no spaces in a length value; e.g., 1.3 em is not a valid length value, but 1.3em is valid. A length of 0 does not require the two-letter unit identifier.

* em (ems, the height of the element's font)
* ex (x-height, the height of the letter "x")
* px (pixels, relative to the canvas resolution)


Percentage Unit:

A percentage value is formed by an optional + or -, followed by a number, followed by %. There are no spaces in a percentage value.

Percentage values are relative to other values, as defined for each property. Most often the percentage value is relative to the element's font size.


In CSS, to specify different padding for all sides:

Example css padding

padding-top:25px;
padding-bottom:25px;
padding-right:50px;
padding-left:50px;

 

Tag : css paddding,padding example,css guide

 

WebTools Categories

Network Tools

Search engine tools

Web site tools

PHP resources

ASP tools and resources

Web design tools

JavaScript tutorials

CSS tutorials

Linux resources

Windows Resources

eCommerce Tools

Free Web Templates

MySql Resources

 

Popular Web Tools

MX lookup
WHOIS lookup
PTR Checker
IP Block Cheacker
IP to Location
Port Checker
Word Count
Character Count
XML sitemap creator
Age Calculator
Google Page rank
w3c validator