BizTalk Utilities CV ,   Jobs ,   Code library  
 
Home Page
CSS
CSS Color Unit
CSS <page> Rule
CSS <media> Rule
CSS <import> Rule
CSS <font-face> Rule
CSS <charset> Rule
CSS <first-line> Element
CSS <first-letter> Element
CSS <before> Element
CSS <after> Element
CSS <right> Class
CSS <left> Class
CSS <lang> Class
CSS <focus> Class
CSS <first> Class
CSS <first-child> Class
CSS <active> Class
CSS <z-index> Property
CSS <word-spacing> Property
CSS <width> Property
<< BizTalk
 

By :Mark Wilson
I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :03/24/2008
Times viewed :218

 

The Length Unit (CSS Reference)

Introduction

The Length Unit can be used to define the length of an element. It is used as a number appended with an abbreviation. The length can be defined either as relative or absolute. The relative unit specifies the length, which is relative to another length property. The following table shows the relative units.

Relative Units

Name:

Description:

em

This unit defines the height of the elements font.

ex

This unit defines the x-height of the elements font.

px

This unit defines the pixel relative to the viewing device.

Example

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>Length Unit Demonstration</title>

<style type="text/css">

H1

{

            margin: 0.5em

}

H2

{

            margin: 1ex

}

P

{

            font-size: 12px

}

</style>

</head>

<body>

<h1>Length Unit Demonstration</h1>

<h2>This is set with margin 1:ex</h2>

<p><a href="http://www.topxml.com">TopXML</a></p>

</body></html>

Output

The absolute units are depended on the viewing medium and are only useful if you know the properties of the medium. The following table shows the available absolute units.

Absolute Units

Name:

Description:

in

This unit can be used to define the length in inches. 1 inch = 2.54 cm.

cm

This unit can be used to define the length in centimeters.

mm

This unit can be used to define the length in millimeters.

pt

This unit can be used to define the length in points. 1pt = 1/72in

pc

This unit can be used to define the length in picas. 1pc = 12pt


Rate this article on a scale of 1 to 10

Your vote :  


 

Recent Jobs

An immediate job opportunity as a B
Software Developers Needed in Charl
Sr. Software Engineer - Analytics
Immediate Mainframe openings for Ch
Immediate TANDEM-TAL openings for C

View all Jobs (Add yours)
View all CV (Add yours)



answering service
fax server
swimming pool contractor
halloween mask
water softener
Teleconference
Host Department NOLIMIT Web Hosting
MSN
sunglasses


    Email TopXML  

Front Page Daily Stuff TopXML Forum XML blogs XML Newsgroups BizTalk Biztalk Utilities Biztalk Utilities Tutorial B2B SAP XML Microsoft .NET Dotnet System XML Soapformatter SQLXML XMLserializer XQuery PHP PHP SimpleXML PHP XML Dom PHP XML RPC PHP XSLT Java Java Java XML Xalan Microsoft ASP ASP Schemas XML SQL Server XML XMLDom XSL XSL Tutorial XSLT Stylesheets General Javascript CSS XHTML WAP