The Forgotten

Beginning before even think of adapting to web standards never did occur to me. I’m not sure about the rest of you but the article written by Gex Lemon at Juicy Studio, HERE has reminded me of the main practice in CSS.

His article titled Div Mania was an explanatory on how most people today have used excessive DIVs without knowing. It hit me when I read that and really went, “oooohh yeahhh..”. I’ve admittedly use so many DIVs that I’ve not remember them to function only as a container. Basically, all I’m saying is that I’ve been using so many DIVs that sometimes they might’ve not beed needed.

I’ve used the DIVs to such an extent that I’ve forgotten there is a SPAN tage to be used. Gez has reminded us by saying:

The div element … doesn’t have any meaning other than the fact it is a container element.

That line definetely struck the mallet on myself for being such an imbecile. I’ve been coding DIVs without knowing it should only be used as a container element. Anyway, in his article he also taught some important declarations. There was a tag I’ve not heard though sadly can’t be used coz Internet Explorer doesn’t support it. Here’s an example:

Adjacent Sibling Selectors

Sibling elements are elements that share the same parent. Adjacent siblings are siblings that are immediately next to each other that share the same parent. Adjacent sibling selectors are denoted with a plus sign, ‘+’. The following example would apply a pale yellow background to all h2 elements that immediately follow a h1 element that share the same parent.

Example: h1+h2 { properties }

If you’d like to read on, click on Div Mania.

Leave a comment