Link colors

B

Brian

Hello:
I'm having trouble doing this and I was hoping someone could help me. I
created a site in dreamweaver and made a template out of it. I set the
default colors for the links in the the page settings. I need to have the
colors of the links change in different sections of the site. Can this be
done.
Thanks
Brian
 
A

Animesh Kumar

Brian said:
Hello:
I'm having trouble doing this and I was hoping someone could help me. I
created a site in dreamweaver and made a template out of it. I set the
default colors for the links in the the page settings. I need to have the
colors of the links change in different sections of the site. Can this be
done.
Thanks
Brian

Different sections = different pages? If yes, then it can be done. You
may want to define them in style-sheet for brevity and continuous
revisions. For instance:

a:link {
text-decoration: none;
color: grey;
}

removes the underline below a link and makes them of grey color. Google
for "CSS link style" without quotes.

Best
A
 
R

Roy Schestowitz

Animesh said:
Different sections = different pages? If yes, then it can be done. You
may want to define them in style-sheet for brevity and continuous
revisions. For instance:

a:link {
text-decoration: none;
color: grey;
}

removes the underline below a link and makes them of grey color. Google
for "CSS link style" without quotes.

Best
A

If different sections, where the word "section" could refer to many things
at different levels, are _regions_ of the page, e.g. menu and footers, then
use a deeper stylesheet hierarchy. I am pretty convinced you could define

..menu:a:link {
text-decoration: none;
color: grey;
}

I am fairly sure I got the syntax wrong, but I hope it convery the idea. I
also hope it's indeed supported.

Roy
 
D

dorayme

From: Animesh Kumar said:
Different sections = different pages? If yes, then it can be done. You
may want to define them in style-sheet for brevity and continuous
revisions. For instance:

a:link {
text-decoration: none;
color: grey;
}

removes the underline below a link and makes them of grey color. Google
for "CSS link style" without quotes.

Can also be done for same web page.

dorayme
 
S

Spartanicus

Brian said:
I need to have the
colors of the links change in different sections of the site. Can this be
done.

It's a very effective method to confuse your visitors to no end, don't.
 
A

Adrienne

Gazing into my crystal ball I observed Spartanicus
It's a very effective method to confuse your visitors to no end, don't.

Not necessarily. If you have a menu with links of one color, you might
want the content links to be another color. If the menu background color
is blue, and the content background color is white, you would not want
the menu color to be blue, but you would probably want the content color
to be blue.
 
S

Spartanicus

Adrienne said:
Not necessarily. If you have a menu with links of one color, you might
want the content links to be another color.

As I read it the OP wants to define different links colours for
different pages of the same site.
 
A

Adrienne

Gazing into my crystal ball I observed Spartanicus
As I read it the OP wants to define different links colours for
different pages of the same site.

Now that it's morning here... you're right, although you might have
different sections of a site different colors, depending on their
purpose, maybe something to do with seasons, where spring has pastel
colors, and fall has fall colors.

I'm doing something a little similar server side, if the current date is a
holiday, a appropriate stylesheet is loaded. I have a main stylesheet
which defines positioning and another only for colors, so Dec 25 gets
xmas.css and Feb 14 gets valentines.css.
 
S

Spartanicus

Adrienne said:
Now that it's morning here... you're right, although you might have
different sections of a site different colors, depending on their
purpose, maybe something to do with seasons, where spring has pastel
colors, and fall has fall colors.

A basic usability principle is that a site should have a consistent look
including the colour scheme. Using different link colours and/or text
decoration is particularly risky because it will prevent people from
recognizing the links as links.
 
B

Brian

Thats what I would like to do. How can I make the menu colors one color and
the text links another
 
A

Animesh Kumar

dorayme said:
Can also be done for same web page.

dorayme

Yes it can be -- but I don't think it is a good idea to confuse your
visitor with different colors for hyperlink in different parts of the
same page

Best
A
 
D

dorayme

From: Spartanicus said:
As I read it the OP wants to define different links colours for
different pages of the same site.


Nevertheless, there may be different design considerations on different
pages that dictate the matter, just as there can be (as Adrienne has pointed
out) on the same page. Still, *your* point is generally good and if there is
no overriding reason, best to keep them the same colour.

dorayme
 
A

Adrienne

Gazing into my crystal ball I observed "Brian"
<[email protected]> writing in
Top posting fixed - to the OP, please do not top post.
Thats what I would like to do. How can I make the menu colors one color
and the text links another

Stylesheet:
#menu a:link {color:#008000} /* green */
#content a:link {color:#0000ff} /* blue */

HTML Doc:
<div id="menu">
<ul>
<li><a href="index.html">Home</a></li>
</ul>
<div id="content">
<h1>Heading</h1>
<p>Here is a link to <a href="http://www.example.com">an example</a></p>
</div>

Don't forget to set a background color for those links, and you should also
include visited, hover, focus and active.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

CSS Tables Colors 0
How can I fix my pattern coding error in c++ 0
JQuery link error 3
Colors 7
Iframe link overlapping text 4
different link colors 20
Force Print of background colors 1
Anchor colors 18

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top