JavaScript and client side scripting.
Moderator: General Moderators
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Thu Jun 03, 2004 3:14 pm
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
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Thu Jun 03, 2004 3:31 pm
how about using css?
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Thu Jun 03, 2004 3:41 pm
Ha well I am totally clueless to how CSS works. Any other suggestions!
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Thu Jun 03, 2004 3:48 pm
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>
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Thu Jun 03, 2004 4:15 pm
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.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Thu Jun 03, 2004 4:20 pm
Code: Select all
.whosOnline .administrator a,
{
color: #red;
}
.whosOnline .developer a
{
color: #red;
}
.whosOnline .user a
{
color: #blue;
}
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>
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Thu Jun 03, 2004 4:48 pm
i do like css but in this case i think the good ol' font tag is the easiest way....
Joe
Forum Regular
Posts: 939 Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow
Post
by Joe » Thu Jun 03, 2004 5:30 pm
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
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Thu Jun 03, 2004 9:19 pm
feyd wrote: Code: Select all
.whosOnline .administrator a,
{
color: #red;
}
.whosOnline .developer a
{
color: #red;
}
.whosOnline .user a
{
color: #blue;
}
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{color:#red;}
.b link{color:#blue;}
Code: Select all
<a href="link" class="a">Administrator!</a><a href="link" class="a">Developer!</a><a href="link2" class="b">Member!</a>
andre_c
Forum Contributor
Posts: 412 Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah
Post
by andre_c » Thu Jun 03, 2004 10:53 pm
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.