-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Mastering CSS
By :

In this section, we'll begin by creating the cleanest HTML possible and then plug in the basic CSS to get it started. The following is what our final site should look like; this is what we're aiming for:
We have a typical horizontal navigation bar. Some of the items have a drop-down menu. We also have a shark logo on the left-hand side of the nav bar, which is overhanging nicely.
Let's jump right in and type the HTML we need. We'll start with this nice, big HTML comment. As you may have noticed, I like these big guys. This is because it's easier to locate parts of the code I need quickly:
<!-- =============== Nav =============== -->
We'll wrap everything in the HTML5 nav
element and apply the grouping
class because we'll be floating everything in there. A clearfix will eventually be necessary so that the container doesn't collapse:
<!-- =============== Nav =============== --> <nav class="grouping"> </nav>
Now...