CSS Hover Controls On the iPhone

Here’s a simple technique to get hover controls working on the iPhone. Hover controls are links and buttons that appear when you hover your mouse over a a target area and so are useful for a lot of secondary actions like delete and edit links – a way to simplify your interface…

Beautiful CSS3 Search Form

Lately I’ve been playing around with CSS3 and discovered some new CSS tricks. Did you know you can make a round circle with border-radius and create inner shadow effect with box-shadow inset? Check out this beautiful search form demo that I’ve created with CSS gradient, border-radius, and box-shadow. It displays perfect in CSS3 browsers and […]

Center Multiple DIVs with CSS

At some point, you may have a situation where you want to center multiple elements maybe <div> elements, or other block elements on a single line in a fixed-width area. Centering a single element in a fixed area is easy. Just add margin: auto and a fixed width to the element you want to center, […]

How to Center an Absolutely Positioned Element Using CSS

Centering an absolutely positioned element is a CSS challenge that occurs now and then. The solutions seem obvious once I’ve done it, but I still find myself googling the problem every few months…

Pure CSS Icons

Having marvelled at David Desandro’s Opera Logo made entirely in HTML and CSS, I wanted to try a similar experiment for myself. So with a large scoop of border-radius I set about trying to create various “common” icons that could be used in your web apps…

Understanding CSS Specificity

The “C” in CSS stands for cascading. This means that that style rules that show up later in the stylesheet will override rules which appear earlier. But this isn’t always the case. There’s something else you have to take into consideration, as well: specificity…

Everything you Know about Clearfix is Wrong

Too often, authors trigger hasLayout without thinking of adding the necessary styling to create the same rendering across all browsers. Because of this, they end up adding IE specific declarations to “patch” their styling. This does not mean we should avoid clearfix at all costs though. It is a great tool which is safe to […]

inline-block vs float

With display:inline-block finally ready for everyday use across the most popular browsers (in all honesty, it has been for a while now), I quickly hit a pretty big dilemma. When comparing inline-block to floats, it wasn’t immediately clear what the exact differences were and what method to prefer. I looked online but couldn’t find a […]

CSS Specificity And Inheritance

Understanding a few often overlooked CSS concepts is important. The concepts may be hard to grasp and look boring at first, but understanding them and knowing how to take advantage of them is important. Two of these concepts are specificity and inheritance. Not very common words among Web designers, are they? Talking about border-radius and […]

« Previous PageNext Page »