|
|
 |
Re: FN-FORUM: FW: ADH WebCreations
date posted 28th June 2007 19:19
Yes you have a point but mine was only one of a few examples, obviously
yours is better not that I didnt know it just didnt write it :p
But to my defence (lol) if you are only ever going to use that span class
once then it doesnt really matter, does it?
Martin
atdc
----- Original Message -----
From: "Ben Johnson (Neogic) F" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Thursday, June 28, 2007 7:22 PM
Subject: RE: FN-FORUM: FW: ADH WebCreations
Martin wrote:
> but basically if you wanted to change the text colour for example
> in a paragraphy I would something like this:
> some text, some text, some more text
.. except that that would be no better than using FONT tags!
The point of CSS is not to swap a code soup of FONT tags for a similar mess
of inline SPAN styles (or TABLEs for DIVs), but to mark-up the content
semantically (i.e., label its meaning) and control the presentation outside
the page from a centralised stylesheet.
Therefore a better example would be:
some text, some text, some more text
some text, Mr Bob Jones
some text, some text, some more text
We can then control the 'look' of all 'person' references using a rule in a
central stylesheet:
SPAN.person { color: red; }
Rather than having presentation rules hard-coded into the content itself.
Common mistake, but important for newcomers to CSS to understand early on if
we're to avoid a web composed of zillions of TABLE-like nested DIVs and
hard-coded inline styles.
Cheers, Ben
--
Ben Johnson, Neogic Web Solutions
// design . development . managed hosting
--
Freelancers, contractors earn more with Prosperity4
Call 0870 870 4414 or visit www.prosperity4.com
and benefit from Inland Revenue approved expenses today.
To advertise here: http://www.freelancers.net/advertising.html
|
 |
|