Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Measurement Units supported in CSS

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 307
    Comment on it

    CSS supports the following Measurement Units

    1. % :- This is % symbol used when we want to give a measurement as a percentage.

         e.g:-div{width:100%;}
      
    2. cm :-An abbreviation of centrimeters is cm and it is used when we want to give a measurement in centimeters.

          eg:-p{margin-bottom:20cm;}
      
    3. em :- An em unit is equivalent to the size of the font given, if you give a font 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.

         eg:-h2 {letter-spacing: 7em;}
      
    4. ex :- It is measurement unit used when we want to give measurment relative to a font's x-height.This x-height is determined by the height of the font's lowercase letter x.

      eg:- p {line-height: 3ex;}
      
    5. in :-An abbreviation of inches is in and it is used when we want to give a measurement in inches.

          eg:-p {margin-bottom:20in;}
      
    6. mm :-An abbreviation of millimeters is mm and it is used when we want to give a measurement in millimeters.

          eg:-div {padding-bottom:20mm;}
      
    7. pc :- An abbreviation of picas is pc and it is used when we want to give a measurement in picas.

         eg:-h2 {font-size: 7pc;}
      
    8. pt :- An abbreviation of points is pt and it is used when we want to give a measurement in point. It is defined as 1/72nd of an inch.

        eg:-h2 {font-size: 7pt;}
      
    9. px :- An abbreviation of pixels is px and it is used when we want to give a measurement in screen pixels.

          eg:- span{width:12px;}
      

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: