Re: CSS Confusion
by Annery Kiln Web Design <info(at)annerykiln.co.uk>
|
Date: |
Mon, 27 Oct 2003 11:14:41 +0000 |
To: |
"mkear" <mkear(at)afpwebworks.com>, hwg-techniques(at)hwg.org |
References: |
worldwidewebservers |
|
todo: View
Thread,
Original
|
|
> I'm confused about CSS2 terminology, and perhaps someone can explain to me.
> I am producing a page that's going to be like this (here's pseudo code)
> <some css tag - "div" maybe?" start - eventlisting>
> Event stuff - dates, times, comments.
> </some css tag - "div" maybe?" start - eventlisting>
> If I want all the event stuff to have particular characteristics,
> without having to put "class = eventlisting" in every tag in that
> area, which of the following do I put in the style sheet?:
> [option A]:
> eventlisting.h2 { yada yada yada }
> eventlisting.h3 { yada yada yada }
> eventlisting.p, td, ul, li { yada yada yada }
This means you have to label every element as class=eventlisting
> [option B]:
> #eventlisting h2 { yada yada yada }
> #eventlisting h3 { yada yada yada }
> #eventlisting p, td, ul, li { yada yada yada }
This means that every h2 or h3 or p (no class=xxx needed) within the
block id=eventlisting will have the styles applied.
This is the least hassle if you can separate out parts of the page
as sections.
> (or is there a third alternative)
None of this made sense to me utnil I got Jeffery Zeldman's Designing
with Web Standards. If you're getting into this sort of stuff this is
THE BOOK to get - his web site www.alistapart.com will help.
> And I'm confused about the difference in CSS terms between <.div
> class=whatever> and <.div id=whatever> and I'm confused about the
> difference between .eventlisting and #eventlisting in a style sheet,
.eventlisting styles will apply to everything explicitly marked as
class=eventlisting
#eventlisting will apply to everything within the div or whatever
block to which it is applied (id=eventlisting).
> Can someone please explain it to me in simple terms?
> Cheers,
> Mike Kear
> Windsor, NSW, Australia
> AFP Webworks
> http://afpwebworks.com
Marten Gallagher
--
Annery Kiln Web Design
Delivering Information Effectively
www.annerykiln.co.uk
Web Design and Site Management
Web Hosting and Print Design
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA