Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
What Are the Length Units Used in CSS
What Are the Length Units Used in CSS? - CSS Tutorials - Page Layout and Background Image Design
✍: FYIcenter.com
To control your page width and page layout, you must understand the length units used in CSS. Here is a list of main length units:
cm - One centimeter, absolute unit. em - The height of the current text font, relative unit. ex - The height of the letter 'x', relative unit. in - One inch, absolute unit. mm - One millimeter, absolute unit. pc - One Pica = 12 pt, absolute unit. pt - One point = 1/72 inch, absolute unit. px - One pixel of the browser resolution, relative unit.
If you want to compare those units, you can try the following file of HTML and CSS codes:
<html><body> <p>Length Units Test by FYICenter.com:</p> <table> <tr><td align=right>1 cm</td> <td align=left><hr style="{width: 1cm}"></td></tr> <tr><td align=right>10 em</td> <td align=left><hr style="{width: 10em}"></td></tr> <tr><td align=right>10 ex</td> <td align=left><hr style="{width: 10ex}"></td></tr> <tr><td align=right>1 in</td> <td align=left><hr style="{width: 1in}"></td></tr> <tr><td align=right>10 mm</td> <td align=left><hr style="{width: 10mm}"></td></tr> <tr><td align=right>6 pc</td> <td align=left><hr style="{width: 1pc}"></td></tr> <tr><td align=right>72 pt</td> <td align=left><hr style="{width: 72pt}"></td></tr> <tr><td align=right>90 px</td> <td align=left><hr style="{width: 90px}"></td></tr> </table> </body></html>
2007-05-11, 4641👍, 0💬
Popular Posts:
How do we create DCOM object in VB6? Using the CreateObject method you can create a DCOM object. You...
Why does malloc(0) return valid memory address? What's the use? malloc(0) does not return a non-NULL...
Advantages of a macro over a function? Macro gets to see the Compilation environment, so it can expa...
What is the purpose of finalization? The purpose of finalization is to give an unreachable object th...
What are the different accessibility levels defined in .NET ? Following are the five levels of acces...