In this project, we're going to switch from using a <table> for layout to a better system; a grid of <div>s that we'll float next to one another.
- Click the "Clone or download" button.
- Select "Download ZIP".
- Extract and open the entire folder in Atom.
- Open
with_table.htmlin Chrome. - This was my solution to the homework. Study it and think up questions. CSS style rules are located in
our_styles.css. - Follow along with the video linked from Canvas
- We will explore some more CSS, the following diagram of the HTML Box Model will be useful:
We translate the basic <table> layout to one that uses the <div> block element. The <div> element is simply a way to contain or encapsulate some html within a block for some common styling purpose.
- Open up
with_grid.html - Each
<table>element has been translated to a<div>element as follows:
| table element | grid element |
|---|---|
<table> |
<div class=“main-content”> |
<tr> |
<div class=“row”> |
<td class="main-content-cell" colspan="6”> |
<div class=" main-content-cell colspan-6"> |
