Many designs call for centering content, either vertically or horizontally. It’s pretty straightforward to center horizontally, but if you wish to support Internet Explorer 7 and earlier, it takes a bit more work to center vertically.
-
jQuery’s tab widget makes it easy to create a set of tabbed sections which can be swapped for one another. At the same time, they can be configured to gracefully fall back if Javascript is disabled.
-
CSS2 says that the
visibilityproperty can take one of three values:visible,hidden, andcollapse. There are many examples of the first two, but I don’t seevisibility: collapsevery often. Not surprisingly, support for it is spotty and not consistent across the various browsers.This post compares
visibility: hidden,visibility: collapse, anddisplay: noneas interpreted by Firefox 3.6 (representative of Gecko-based browsers), Safari 4.0 (representative of Webkit-based browsers), Opera 10.10, and Internet Explorer 8.0 (with Compatibility View disabled). -
Floats are a powerful feature of CSS and for the most part are pretty straightforward to use.
However, there are many subtleties about them which can cause people to wonder why, for example, images aren’t correctly positioned.
Usually the quickest solution is to throw a bunch ofclear: bothCSS rules either onto objects or onto emptydivs.
This post goes into some of the details about how floats are implemented and how to use them.
How the various browsers’ float implementations differ will also be discussed, but for the most part the latest versions of the browsers all do a good job of agreeing with how to implement the specifications. -
Animation in web applications can do more than add pizazz to a page, it can give good visual cues to the user as to what is happening.
For example, consider an image carousel, where you have one largish image and smaller ones in the background.
Having images animate to get larger and move into place (in addition to sliding on and off the screen) lets the user confirm the intended image is being shown. -
There are several methods you can use to create odd/even stripes for lists to make them easier to scan. A List Apart had an article about creating stripes, but being over five years old, it understandably doesn’t cover some newer techniques which are available. Then again, the need to support legacy browsers makes the article more relevant than you would think at first.
-
CSS3 has a module which describes Multi-column layout which at first glance seems similar to table layouts. The main difference is contents in a block with multi-column layout will flow into the multiple columns, while content in tables will stay within the original columns.
-
In a previous post about using CSS to style HTML tables, I covered collapsing borders, empty cells, and the
inline-tabledisplay type. In this post I’ll cover headers and footers, captions, and columns, as well as other points which are good to know when using CSS with tables. -
Modern browsers have the ability to display very complex HTML tables when using CSS to style them. While there are people who frown upon using tables for page layout, there’s no better nor no more flexible way to display tabular data than using tables. While this post is not a tutorial on HTML tables, it will describe some of the intricacies of styling them. The techniques shown here target recent versions of Safari, Firefox, Opera, and IE.
The information in this post was derived the specifications for CSS 2.1 and various versions of HTML (HTML 4, XHTML 2, and HTML 5 are similar enough for this discussion).
-
The current version of Mobile Safari on the iPhone and iPod touch allow you to do 3D transformations in CSS. This allows you to give objects perspective and rotation in 3D space, as well as the ability to use transitions and animations.





