FAQs archive
These are some of the questions I find are commonly asked on the CSS forums of which I’m a member (CSS Creator, Sitepoint), so here’s some quick answers to those common problems.
HTML/CSS newbie FAQs
After spending a while on web development forums, you start to see the same questions being asked regularly. So here I’m going to answer some of these common beginner questions and hopefully save me typing answers out repeatedly in the future because I can just refer the poster to here or copy it myself.
Why does my content flow outside its box?
Usually this question is accompanied by: “It looks fine in Internet Explorer but not Firefox”
and it’s usually because a height has been specified on the element in question.
Which browsers should I test in?
Well I’ve discussed which browser to avoid using for primary testing, and which browser I prefer to use, so which browsers should one test in?
What is ’semantic mark-up’?
se·man·tic adj.
- Of or relating to meaning, especially meaning in language.
- Of, relating to, or according to the science of semantics.
OK, so semantic has to do with ‘meaning’ but what has that got to do with coding web pages? Well, when referring to semantic mark-up, it means using the correct tag to accurately describe the type of content.
What is divitis?
‘Divitis’ is a term used to describe an error common amongst newcomers to building CSS-based sites whereby they use too many divs for everything.
Why doesn’t :hover work in IE?
You may have seen on other sites an effect whereby the background colour of a containing element changes colour when you hover over it. A look at their CSS might reveal something like div:hover or li:hover. This is also how a lot of CSS dropdown menus work too, by applying a :hover to a list item.
What is shorthand CSS?
Shorthand CSS is the method of writing related style properties all on one line instead of several. Using shorthand CSS results in files that are smaller in size and easier to read and maintain.
How do I make my CSS file smaller?
The key feature of Cascading Style Sheets and probably the one not realised by most newcomers to CSS is that certain style properties are inherited. This means that style properties (mostly those relating to styling text including color, font-size, text-alignment etc.) set on a parent element are inherited up by every descendant element (any element contained within the parent whether directly or indirectly).
What’s the difference between classes and IDs?
Classes and IDs are how we create different styles for different elements on the page.
IDs are unique identifiers and can only be used once on any one page. Classes can be reused and applied to different elements.
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







