HTML and CSS Reference
In-Depth Information
Starting with the following basic
styles, this screenshot shows what the
page looks like in a browser that
doesn't have any default HTML5
styles:
header, nav, section, article
{padding: 4px; margin: 4px;}
header
{ background: #000; color: #999; }
nav
{ border: 4px solid #000; }
section
{ border: 4px dashed #000; }
article
{ border: 2px dotted #000; }
By making a single change to that
CSS , you can make the page work in
most older browsers. See if you can
spot it:
header, nav, section, article
{ padding: 4px; margin: 4px;
display: block; }
header
{ background: #000; color: #999; }
nav
{ border: 4px solid #000; }
section
{ border: 4px dashed #000; }
article
{ border: 2px dotted #000; }
If you specify that the block-level
HTML5 elements <header> , <nav> ,
<section> , and <article> should be
display: block , everything works as
you want.
Search WWH ::




Custom Search