Gossamer Forum
Home : General : Perl Programming :

Stylesheets

Quote Reply
Stylesheets
Hi

How can I assing a group of things to one class? In other words.. what I'm trying to do is to create one class "TD" (table cell) and then I want to be able to control the background colour and text from this one class. Can this be done? Or do I have to do two different classes?

Cheers

- wil
Quote Reply
Re: [Wil] Stylesheets In reply to
TD { bgcolor: #000000 }

....makes all TD's black

TD.yourclass { bgcolor: #000000 }

....makes only <TD class="yourclass"> black.
Quote Reply
Re: [Wil] Stylesheets In reply to
CSS annoys the heck out of me because Netscape 4.5 insists on not inheriting classes (such as elements of the BODY class to the TD class...) and not even having a full freaking implementation of CSS to begin with ;-) I try not to use it for anything escept for text attributes and things I can't control with a reasonable amount of plain HTML.

Have a look at http://www.blooberry.com. There's a pretty thorough HTML reference and decent CSS reference as well.

--Philip
Links 2.0 moderator

Last edited by:

King Junko II: Feb 23, 2002, 10:36 AM
Quote Reply
Re: [RedRum] Stylesheets In reply to
So am I right in assuming I can do:

TD.yourclass { bgcolor: #000000; font: arial; }

??

- wil
Quote Reply
Re: [Wil] Stylesheets In reply to
Hm, so how do I swtich betwen styles? I've tried the following, but it doesn't work.

OnMouseOver="style.navsel"

Where I have a css style named TR.navsel

Cheers

- wil
Quote Reply
Re: [Wil] Stylesheets In reply to
Hey Wil, I don't use stylesheets often enough to remember all of the nomenclature, so I downloaded a program (nagware) called Top Style. I highly recommend it. You can set your "level" of style sheet and it is pretty user-friendly.

Here's the url: http://www.bradsoft.com

Good Luck!
Quote Reply
Re: [Watts] Stylesheets In reply to
Its cool how a stylesheet can totally change the way a site looks.

Last edited by:

RedRum: Mar 1, 2002, 10:46 AM
Quote Reply
Re: [Watts] Stylesheets In reply to
Hi

Sorry, I forgot to follow up on this thread. I managed to fix the problem. Not a lot documented on the web for this, actually.

I found out that I should use this.className='' and not this.class='' as I had been using. Works like a charm! Much more flexible than defining the bg color and everything in the onmouseover. Keep them as a class! :-)

- wil