Learn about common CSS styling techniques including
CSS truly enables designers to change every aspect of an HTML elements appearance. Simple ordered lists can become navigation tabs or drop-down menus. Images and containers for text can be positioned and decorated in very robust ways.
body { background: black; } article { background: white; margin: auto; width: 600px; }
background: gray url(bg.png);
div class="photo"
).
border-image: url(border.png) 25 25 stretch;
header, footer { border: 1px solid red; color: red; } #main { border: 1px solid blue; color: blue; }
overflow: auto
to the #main section. This will resize the height of this text container so that in will encapsulate the floating image. Warning: If this section had an
explicit height, scroll bars would be created instead of resizing the section.background-color: #ccc; padding: 10px; text-align: justify; box-shadow: 5px 5px 5px #888;
clear: both
so that the footer renders below the containers that are floating right and floating left.nav ul, nav li { padding: 0; margin: 0; } nav li { list-style: none; }
nav a { border: 1px solid orange; }
. Notice that this CSS only changes hyperlinks in the nav.
display: block
with a height: 32px
and padding: 5px 25px;
. Also, make the top right and top left borders round:
border-top-left-radius:1em;
border-top-right-radius:1em;
nav a { // Insert you code here }
float: left;
nav li { // Insert you code here }
overflow: hidden;
and give it height: 32px;
and background-color: gray;
nav ul { // Insert you code here }
padding-top: 20px;
and text-align: center;
header h1{ // Insert you code here }
background-color: white;
, padding: 20px;
and margin: 0px;
header h2{ // Insert you code here }
Upload lab8.css to Blackboard.