The Theory The CSS float property is used to create layouts where content would flow around elements (typically pictures). In years past, in fact, entire site layouts would be done with floats. Fortunately, we now have dedicated layout modes like display:grid and display:flex, so the use of floats as a full layout tool has greatly […]
Category: CSS
Layout Recipe: TubeWorld (revised)
Using Floats For Two-Column Layouts This exercise will help you understand how to make a two-column website layout using the CSS float property. If you need a quick refresher on the float property, read this. This exercise will hopefully also reinforce your understanding of HTML paths and the CSS Box Model. First of all, please download […]
List Based Menus
One Way to Make a List-Based Horizontal Menu Make an unordered list with links in each list item. Give the UL (contextually) a list-style-type of none Zero the UL’s margin-left and padding-left Give the LIs a width (typically in percentage) Float the LIs Possible Options Set the line-height of the A tag to control the height […]
Selectors: Tags, Classes, IDs
Which Selector to Choose & Why There are three main CSS style types: tags, classes, and IDs. This article will explain the difference between tags, classes, and IDs. Tag Styles I’ve started this discussion with tag styles because they’re the most basic and therefore easiest to understand. When we make a tag style, we are […]