In this post I'd like to share some facts about CSS units of measurements for Length units, Percentage units & Color units:
1. Length Units
<length> indicates a number followed by a unit of measure:24px.
The number can be an integer or a decimal fraction, and can be preceded by + or -.
Units can be absolute or relative:
Absolute: mm, cm, in, pt, pc (millimeters, centimeters, inches, points, picas)
Relative: em, ex, px (the element's font height, the element's x-height, pixels)
Font size may be defined in points, pixels, inches, or centimeters (pt, px, in, cm) or as a percentage.
<absolute-size> can be:xx-small, x-small, small, medium, large, x-large, xx-large.
<relative-size> can be:larger, smaller.
2. Percentage Units
<percentage> indicates a number followed by a % sign:50%.
In the text-indent, margin, padding, and width properties, percentage values are relative to the width of the parent element.
In the font-size property, percentage values are relative to the font size of the parent element.
In <color> values, percentages can be used to express RGB values.
3. Color Units
<color> can represent either <color-name> or <rgb> values, as defined below:
<color-name> can be: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
<rgb> can be:
#<hex><hex><hex>
rgb(<number>, <number>, <number>)
rgb(<percentage>,<percentage>,<percentage>)
<hex> represents a hexidecimal value, <number> a decimal value, and <percentage> a percentage.
source:webmonkey.com
Monday, March 23, 2009
Understanding CSS Units of Measure
Subscribe to:
Post Comments
(
Atom
)
About Me
- Rakesh Sharma
-
Web Designer | Blogger | Web Addict
Follow on Google+
Recommend on Google +1
RSS Feed
Subscribe Recent Posts
Popular Posts
-
If you are looking 'how to put a any form in a blogger' then this post is going to help you. Putting a form in blogger is very easy....
-
If you are looking for free e-books for Web Design and Development then this post is for you. Here I have shared some very useful e-books wi...
-
When you write a CSS for your project you never know what kind of bug or issue you will face at time of browser compatibility. Internet Ex...
-
Cooliris is simply the fastest and most stunning way to browse photos and videos from the Web or your desktop for free. Effortlessly scroll...
-
Now a days every one intend to aware about HTML5 more and more. According to experts HTML5 is a future of the web. There are some interestin...
-
jQM (jQuery Mobile) becoming very popular now a days. Mobile developers from across the world contributing their knowledge to make it more u...
-
In web development scripts like jQuery and Ajax becomes very handy for web developers. If you are a learner or a expert these scripts is rea...
-
In this post I'm sharing a list of XML based CMS (Content Management System) to help web designers and developers. CMS usually implement...
-
Today I would like to share that how to add a Facebook fan list to your blog or website (like I have added here at right sidebar). This is t...
-
Today I am really happy to anounce that I have launched new social book marking site called ' TutLinks '. This is a first networkin...
0 comments :
Post a Comment