<style type="text/css">
<!--
p.top {margin-top:1cm} /* składnia z podaniem */
p.right {margin-right:2cm} /* wartości atybutu class */
p.bottom {margin-bottom:1cm}
p.left {margin-left:2cm}
p
{ /* składnia podstawowa */
background-color:yellow; padding:1em;
border-style:solid; border-width:1px
}
-->
</style>
Ten akapit należy do klasy top. {margin-top:1cm}
Ten akapit należy do klasy right. {margin-right:2cm}
Ten akapit należy do klasy bottom. {margin-bottom:1cm}
Ten akapit należy do klasy left. {margin-left:2cm}
% - procent in - cal cm - centymetr mm - milimetr em - jedno em jest równe wysokości bieżącej czcionki ex - jedno ex jest równe wysokości literki x pt - punkt drukarski, 1 punkt drukarski jest równy 1/72 cala pc - pika, 1 pika jest równa 12 punktom drukarskim px - piksel, najmniejsza kropka na ekranie monitora
5.5.1 'margin-top'
Value: <length> | <percentage> | auto Initial: 0 Applies to: all elements Inherited: no Percentage values: refer to width of the closest block-level ancestor
5.5.2 'margin-right'
Value: <length> | <percentage> | auto Initial: 0 Applies to: all elements Inherited: no Percentage values: refer to width of the closest block-level ancestor
5.5.3 'margin-bottom'
Value: <length> | <percentage> | auto Initial: 0 Applies to: all elements Inherited: no Percentage values: refer to width of the closest block-level ancestor
5.5.4 'margin-left'
Value: <length> | <percentage> | auto Initial: 0 Applies to: all elements Inherited: no Percentage values: refer to width of the closest block-level ancestor
5.1 Notation for property values