Tag: HTML

My links won’t change colour when I hover over them


Usually when people have trouble with their links not doing what they want, it’s because they’ve arranged them in the wrong order. More on My links won’t change colour when I hover over them

How do I get different styled links?


So you’ve set up the styles for the links of your page but you have one section that you want to be different from everything else. To do that, you need to assign a different class or ID.

More on How do I get different styled links?

How do I centre my layout?


To centre a CSS layout horizontally, you need to add margin: 0 auto; to either the body or a containing element More on How do I centre my layout?

My floated layout won’t work!


Usually when people have trouble with floating columns it’s because they’ve specified a width where there doesn’t always need to be one.

More on My floated layout won’t work!

Why won’t faux columns work?


One of the easiest methods of giving your site the appearance of the columns being the same height is to used the Faux Columns technique as first outlined by Dan Cederholm on A List Apart.

While the method is simple, unfortunately, many newcomers to CSS have trouble getting it right at first. More on Why won’t faux columns work?

Single image replacement rollovers with Suckerfish dropdowns

I discovered two of my most often used CSS techniques at the same place - Petr Staníček’s Wellstyled.com (Staropramen, Budvar, Pilsner Urquell, great CSS techniques - gotta love the Czechs ;) ).

And those techniques are an image replacement (IR) technique that I later found out was actually called the Gilder Levin method and the use of a single image for creating CSS rollovers without the need for preloading images.

More on Single image replacement rollovers with Suckerfish dropdowns

Absolute positioning practical examples

If you’ve read Absolute Positioning Pitfalls, you’re probably wondering when you can use absolute positioning.

Well, I generally find that I use it not for laying large areas of a layout, areas that contain multiple other elements, but rather for positioning individual elements in relation to other elements. (It certainly can be used for creating large layout areas in certain instances, but I’m not going to cover that here.)

More on Absolute positioning practical examples

Absolute positioning pitfalls

This article first appeared on CSS Creator Forum and was written in response to the common requests for help from people new to CSS who were encountering problems whilst trying to use absolute positioning to create layouts (seemingly as a result of using Dreamweaver in ‘design view’ mode).

More on Absolute positioning pitfalls