[thelist] More CSS ignorance

Jamie Lewis evolt at eyota.net
Wed Oct 27 15:58:36 CDT 2004


> http://www.w3schools.com/css/default.asp

I'll put my vote in on that one, thats pretty much where I learnt most of my
css from. I'd picked up basics from work collegues and forums, but the
majority of my basic knowledge come from w3schools.  Or 'view source' is
always another good one ;-)

Jamie

Eyota Technology Group - http://www.eyota.net
Complete Web & IT Solutions ~ From Grass Roots 2 Corporate
[Current Special: 20% Off ALL Reseller Web Hosting Accounts]


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of M. Seyon
Sent: 27 October 2004 18:00
To: thelist at lists.evolt.org
Subject: Re: [thelist] More CSS ignorance


Message from Christian (10/27/2004 11:29 AM)
>Dear list,
>
>Thanks to all who've already been patient with me.
>
>How do I achieve multiple styles of link in CSS?  I want one style for my
>top menu, one for my left menu, and one for links in the body text.

Hi Christian,

You can achieve this using classes or IDs. Here's one way.

Give each area of your page a unique id - #topmenu, #leftmenu #body, for
example.

Then in your stylesheet you do something like this

#topmenu a
{color: red}

#leftmenu a
{color: blue}

#body a
{color: green}

These are called descendant selectors. Essentially you're saying apply the
styles to the A element only if it's contained by the specified element.

Your HTML would look like

<div id="topmenu">
<a href=...>
</div>

<div id="leftmenu">
<a href=...>
</div>

<div id="body">
<a href=...>
</div>

I know you've asked a couple questions and gotten answers from thelist so
it might be starting to look really easy to just come online with all your
questions, but you'll really learn a lot more and understand CSS better if
you invest some time in some proper CSS resources (books or website
tutorials) and use the list to supplement that knowledge.

May I recommend a book that does an excellent job of walking you through
the basics of combining HTML and CSS - HTML For the World Wide Web, 5th
edition, with XHTML and CSS, Elizabeth Castro, ISBN 0321130073

Or if you're on a tight budget, here are two good online resources:
http://www.mako4css.com/
http://www.w3schools.com/css/default.asp

regards.
-marc

--
Trinidad Carnival in all its photographic glory. Playyuhself.com
http://www.playyuhself.com/
--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list