| Author |
Associating link colour within another class.
|
|
| Dave Smithz 2005-01-25, 7:23 pm |
| Hello,
Is there a way of associating what colour the hyperlinks should be within a
particular class?
Let me elaborate:
I am using programming to generate HTML code. I want different sections of
the webpage to be coloured differently depending on variables in my code and
I use CSS classes to achieve this.
Therefore a loop like follows
Do while condition = true
if (ChosenColour = green) then
print "<TR CLASS='COLOURCLASS_GREEN'"
if (ChosenColour = red) then
print "<TR CLASS='COLOURCLASS_RED'"
etc....
Loop
However,
within the class COLOURCLASS_<WHATEVER COLOUR> I also want to define the
hyperlink colours.
Therefore I would also want to set the hyperlink colours within that
particular table row and control what colour a Hyperlink is from within
COLOURCLASS_<WHATEVER COLOUR>
At present it seems that I have to apply the class to each particular <A
href=""> </a> that occurs and this makes my programming a bit more difficult
and a bit more messy.
I hope I have made what I am trying to achieve clear and if so I hope
someone can help me find a way of associating control of hyperlink colours
to different regions of a HTML page, without needing to apply a specific
class to each <A> tag.
Kind regards
Dave
| |
| Steve Pugh 2005-01-25, 7:23 pm |
| "Dave Smithz" <SPAM FREE WORLD> wrote:
>Is there a way of associating what colour the hyperlinks should be within a
>particular class?
Yes.
..classname a:link {color: #rrggbb; background-color: #rrggbb;}
and likewise for the other pseudo classes.
>At present it seems that I have to apply the class to each particular <A
>href=""> </a> that occurs and this makes my programming a bit more difficult
>and a bit more messy.
Not at all, see above.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>
| |
| Dave Smithz 2005-01-25, 7:23 pm |
|
"Steve Pugh" <steve@pugh.net> wrote in message
news:hnfdv098e177s73r67n69m3ck4970kj652@4ax.com...
>
> Yes.
> .classname a:link {color: #rrggbb; background-color: #rrggbb;}
> and likewise for the other pseudo classes.
Ahhhh, EURKEA!!!!!
Thanks for the rapid response.
The style sheets are not that bad (or darn good to put it another way). Why
did I put off learning them for two years!!!!!!
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |