Kyle James Matthews said:
Actually, I'm going for projectile vomiting. Do you think I have a shot?
Thank you for that advice, but I have a follow-up question. When you
refer to my CSS as "veritable overkill," are you suggesting that the
design I am trying to achieve is too complicated and I should simplify,
or that the CSS I am using to achieve my design is too complicated and
can be achieved more concisely?
The latter. The design *is* too complicated for what it does but that is how
you wrote it so that's OK. My problem is with the CSS.
You seem to be using a seperate CSS rule to describe each element on the
page. This is reinforced by the fact that you select based on id, not class
(*). This makes it tricky to change one single CSS rule and have the entire
page or site change.
You compound this by having a body.index rule, replicating most of what is
in the body rule anyway. Do you intend to have your index.html with <body
class="index"> and your arts.html with <body class="arts">? Confusing and
needless replication.
CSS is meant to describe the whole site, not each individual page or each
individual bit of a page. That is, change one single rule and your entire
site changes from dark purple to shocking pink.
(*) It is better to use class as then you can have several elements on the
page with the same class.
Keep inheritance in mind. For example, only specify font once, in the body
rule and let it inherit down to the child elements. Don't replicate it all
over the place, this just makes it harder to change.
Don't have rules like .hidden, .center, .left etc. You end up with (in your
HTML) something like
<div class="center">
which is exactly the same as
<div style="text-align: center">
A style rule should not describe just a single property. It should describe
the entire visual appearance of the element it selects.
Hmmm. A bit rambly
How to end...
Don't write your HTML in anticipation of how it will look on the page. HTML
is for content. Get that content in there first. Things like your header
block, your navigation block, your content block.
Only once that is done think about how each block should look and create a
CSS rule, selecting that block, that describes how it should look.
Conversly, don't write the CSS rules in anticipation of what the content
will be (your .center rules). You might just as well include all the CSS in
a style attribute.
Finally, KISS principle. If you can remove something without affecting the
look of the page then do so.
Cheers
Richard.