Link to home
Start Free TrialLog in
Avatar of regodab
regodab

asked on

custom links

I am trying to set different styles for certain links on a page, ideally getting rid of the underline aswell.

Will I have to use images or can I use something to set colours of unvisited/visited/active links at different points on the page.

If anyone can give me any advice I would be grateful.

Thanks

Daniel
Avatar of weed
weed
Flag of United States of America image

The only way to use different colors for different links on the same page is to use CSS. But to just get rid of underlines and change the colors of links from their default check your Page Options dialog.
Avatar of Snazzy_Graphics
Snazzy_Graphics

Yep you want to head over to the CSS control panel and define some styles. Since you want to change how it handles links in different ways in different spots on the page, you need custom link styles, which you then apply to each link.

You can do this for this page only or with an external file.

For no underline, set decoration to "none."

--Snazzy
here's a quick example showing what snazzy graphics suggested.

<html>

<head>

<style><!--
A { text-decoration:none }
//--></style>

</head>

<body>
<p>
<a href="...">This is not underlined</a>
</p>
</body>

</html>
 
try this aswell :-)

<html>
<head>
<style>
<!--
a:link {color: yellow}
a:active {color: green}
a:hover {color: blue}
a:visited {color: red}
-->
</style>
<body>
<a href="http://www.yahoo.com">
Yahoo
</a>
</body>
</html>

and here's a useful link u may want to take a look at

http://website.lineone.net/~alan.duncan/howto/linkprop.htm
Yep, that's how it would come out. Good examples.

Thing is, as far as DW way, you need a custom stylesheet (either page or ext.) in order to be able to reassign colors throughout the page--i.e. you are not changing global links, you need named styles.

--Snazzy
ASKER CERTIFIED SOLUTION
Avatar of klykken
klykken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
you can also specify different color in the body tag using
link="#ffffff", alink="#cccccc", vlink="#000000" etc
Avatar of regodab

ASKER

Sorry for the delay in getting back to this question. Maybe I am misreading the answers but what I am trying to do is on one part of the page have my a:link style as white with no underline and at another point have it as blue with an underline.

Sorry if this has already been answered but if anyone has any pointers I would be grateful.

Thanks

Daniel
Avatar of regodab

ASKER

Sorry for the delay in getting back to this question. Maybe I am misreading the answers but what I am trying to do is on one part of the page have my a:link style as white with no underline and at another point have it as blue with an underline.

Sorry if this has already been answered but if anyone has any pointers I would be grateful.

Thanks

Daniel
Without properties for hover, active etc, the code gets really simple for this:

<html>
<head>
<title>Your Title</title>
<style type="text/css">
<!--
a.one {color: white; text-decoration: none}
a.two {color: blue; text-decoration: underline}
-->
</style>
</head>
<body bgcolor="#666666" text="#000000">
<a href="file1.html" class="one">white link, no underline</a>
<a href="file2.html" class="two">blue link, underlined</a>
</body>
</html>

For properties on hover, active etc, see sturobinson and my comment above.
--
klykken
Avatar of regodab

ASKER

Thanks for coming back and explaining. I understand style sheets a lot more now and am definatly going to use them more now.

Thanks

Daniel