CSS 2 Example 12

>> English << | česky | Português ZVON > Tutorials > CSS2 tutorial
Intro / Search / ZVON
>> Example 12 << | Prev | Next | Index | Contents

For each displayed element a rectangular box is generated. Each box has a content area (e.g., text, an image, etc.) and optional surrounding padding, border, and margin areas (1). To display a border, it must be switched on with border-style instruction (2).

XML SourceCSS stylesheetExample link
(1)
<AAA>
<BBB>bbbb</BBB>
<CCC>cccc</CCC>
<DDD>dddd</DDD>
<EEE>eeee</EEE>
</AAA>

AAA {background-color:black}
BBB {color:black; background-color:white}
CCC {color:navy; background-color:yellow; padding:20px}
DDD {color:navy; background-color:aqua; margin:20px}
View output
XML SourceCSS stylesheetExample link
(2)
<AAA>
<BBB>bbbb</BBB>
<CCC>cccc</CCC>
<DDD>dddd</DDD>
<EEE>eeee</EEE>
</AAA>

* {border-style: solid }
View output

AltStyle によって変換されたページ (->オリジナル) /