26.01.2019 Views

XML Simplified

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Module 5<br />

Style Sheets<br />

Color { padding: 2 5 8 }<br />

Inserts padding between the borders and text of Color element. The value 2 is applied to top border,<br />

5 to left and right borders, and value 8 to bottom border.<br />

Concepts<br />

Price { padding: 2 5 8 10 }<br />

Inserts padding between the borders and text of Price element. The value 2 is applied to top border,<br />

5 to right border, 8 to bottom border, and 10 to left border.<br />

The output is shown in figure 5.33.<br />

5.3.10 CSS Units<br />

Figure 5.33: Output of Using Padding<br />

The values assigned to CSS properties are expressed in length units. Table 5.3 describes these units.<br />

Unit Type<br />

Relative<br />

Absolute<br />

Unit Designator<br />

em – defines the height of element's font.<br />

ex – defines the x-height of element's font.<br />

px – defines the pixel relative to display device.<br />

% - percentage.<br />

in – inches<br />

cm – centimeters<br />

mm – millimeters<br />

pt – 1/72 inch<br />

pc – 12 pt<br />

Table 5.3: CSS Units<br />

<strong>XML</strong> <strong>Simplified</strong><br />

Version 1.0 © Aptech Limited

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!