Page 1 of 1

html colour problems!

Posted: Thu Jun 03, 2004 3:14 pm
by Joe
This is really an html question but these are my favourite forums and I thought it would be the best place to ask. I am making a who's online script where administrators/developers have a link colour of red while normal users have a link color of blue. The only way I know to change a link colour is:

<BODY BGCOLOR="#FFFFFF" TEXT="black" LINK=red VLINK=red ALINK=red>

but you can only use the <body> tag once which prevents me from using 2 seperate link colours. Is there any way to bypass this problem. If so, please help ;)


Regards




Joe 8)

Posted: Thu Jun 03, 2004 3:31 pm
by andre_c
how about using css?

Posted: Thu Jun 03, 2004 3:41 pm
by Joe
Ha well I am totally clueless to how CSS works. Any other suggestions!

Posted: Thu Jun 03, 2004 3:48 pm
by dull1554
you can have you link and use the font tag like this

Code: Select all

<a href=blah.html><font color=blah>asdfasdfadf</font></a>

Posted: Thu Jun 03, 2004 4:15 pm
by mudkicker
Joe wrote:Ha well I am totally clueless to how CSS works. Any other suggestions!
mate you gotta have a clue about CSS, it rocks!!!

There are CSS editors, and i think you can start with them easily.

TopStyle Editor for example.

Posted: Thu Jun 03, 2004 4:20 pm
by feyd

Code: Select all

.whosOnline .administrator a,
&#123;
  color: #red;
&#125;

.whosOnline .developer a
&#123;
  color: #red;
&#125;

.whosOnline .user a
&#123;
  color: #blue;
&#125;

Code: Select all

<span class="whosOnline"><span class="administrator"><a href="whatever">admin</a></span> <span class="developer"><a href="whatever">dev</a></span> <span class="user"><a href="whatever">user</a></span>

Posted: Thu Jun 03, 2004 4:48 pm
by dull1554
i do like css but in this case i think the good ol' font tag is the easiest way....

Posted: Thu Jun 03, 2004 5:30 pm
by Joe
Hey thanks a lot guys all worked well. Hey mudkicker. I have no intentions to start CSS at the moment as I am very busy with my PHP + mysql studies but I will keep your word and learn it as soon as I can. Thanks!

Due to me knowing no CSS at all I decided to use dull1554's method. Thanks a lot man.


Joe

Posted: Thu Jun 03, 2004 9:19 pm
by d3ad1ysp0rk
feyd wrote:

Code: Select all

.whosOnline .administrator a,
&#123;
  color: #red;
&#125;

.whosOnline .developer a
&#123;
  color: #red;
&#125;

.whosOnline .user a
&#123;
  color: #blue;
&#125;

Code: Select all

<span class="whosOnline"><span class="administrator"><a href="whatever">admin</a></span> <span class="developer"><a href="whatever">dev</a></span> <span class="user"><a href="whatever">user</a></span>
??

Code: Select all

.a link&#123;color:#red;&#125;
.b link&#123;color:#blue;&#125;

Code: Select all

<a href="link" class="a">Administrator!</a><a href="link" class="a">Developer!</a><a href="link2" class="b">Member!</a>

Posted: Thu Jun 03, 2004 10:53 pm
by andre_c
I have to recommend that you learn CSS as soon as you have time. It was the sweetest discovery I made after I started making websites.
Everything to do with colors, layout, and design became much, MUCH easier and accurate.
It's worth it.