HTML and CSS Reference
In-Depth Information
Given what you know about CSS table displays, sketch out how the two columns
from the Starbuzz page, “main” and “sidebar”, would fit into a table. Check the
answer at the end of the chapter before moving on…
Draw your table here.
How to create the CSS and HTML for a table display
As you can imagine, we're going to need to add some CSS to tell the browser to
display our columns like a table, but we also need to add some HTML. Why? We
need to add a bit of structure that represents the columns and rows of the table,
and the structure of the enclosing table as well.
Doing this is straightforward—all we need to do is create a <div> for the entire
table and then one <div> per row. And for each column, we just need a block-
level element that is placed within the row <div> . Let's see how the HTML is
going to work, and then we'll come back to the CSS we need.
Search WWH ::




Custom Search