PDA

View Full Version : Simple way to link without the underline?


kevs
12-31-2006, 09:29 PM
Is there a Simple way to link without the underline in Dreamweaver?
Dreamweaver MX/ Mac OS 10.4.8

davidj
01-01-2007, 12:42 AM
modify/define your links using CSS
<style type="text/css">

A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: none; color: red;}

</style>

d a v e
01-01-2007, 07:35 AM
<style type="text/css">

A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: none; color: red;}

</style>

except in this order

<style type="text/css">

A:link {text-decoration: none}
A:visited {text-decoration: none}
A:hover {text-decoration: none; color: red;}
A:active {text-decoration: none}
</style>


and if you are going to include a:focus too then
Link, Visited, Hover, Focus, Active ;)

kevs
01-02-2007, 12:37 AM
sorry, guys, but,
am I still in DW?
don't know anyting about CSS, can one walk me through that?

chriskq
01-02-2007, 12:52 AM
d a v e, it does not matter about the order. unless u are targeting something specific after targeting a general class in css.

kevs
just copy and paste the code provided above before the </head> section of the site. you'll have to switch to code view to do this.

see what is does and then starting playing with it. general css styling is easy to pick up

kevs
01-02-2007, 03:46 AM
Ok, I pasted davidj's code at beginning of page. it got rid of underline, but then would not link anymore

neonfluxx
01-02-2007, 05:07 AM
you need to use css that will solve the problem.

davidj
01-02-2007, 05:48 AM
you need to use css that will solve the problem.

eh! thats what we are on about. c'mon neon, read the thread before adding to it

davidj
01-02-2007, 05:50 AM
Ok, I pasted davidj's code at beginning of page. it got rid of underline, but then would not link anymore


paste your code so i can help you

d a v e
01-02-2007, 04:10 PM
chrisk
"d a v e, it does not matter about the order. unless u are targeting something specific after targeting a general class in css."

yes it *does* matter and for general styles only too!: this is according to Eric Meyer in his book CSS: The Definitive Guide, 3rd Edition November 2006

Order sorting is the reason behind the often-recommended ordering of link styles. The recommendation is that you array your link styles in the order link-visited-hover-active, or LVHA, like this:
:link {color: blue;}
:visited {color: purple;}
:hover {color: red;}
:active {color: orange;}
Thanks to the information in this chapter, you now know that the specificity of all of these selectors is the same: 0,0,1,0. Because they all have the same weight, origin, and specificity, the last one that matches an element will win out. An unvisited link that is being "clicked" is matched by three of the rules:link, :hover, and :activeso the last one of those three declared will win out. Given the LVHA ordering, :active will win, which is likely what the author intended.

Assume for a moment that you decide to ignore the common ordering and alphabetize your link styles instead. This would yield:
:active {color: orange;}
:hover {color: red;}
:link {color: blue;}
:visited {color: purple;}
Given this ordering, no link would ever show :hover or :active styles because the :link and :visited rules come after the other two. Every link must be either visited or unvisited, so those styles will always override the :hover rule.

Let's consider a variation on the LVHA order that an author might want to use. In this ordering, only unvisited links will get a hover style; visited links do not. Both visited and unvisited links will get an active style:
:link {color: blue;}
:hover {color: red;}
:visited {color: purple;}
:active {color: orange;}
Of course, sometimes such conflicts arise when all the states attempt to set the same property. If each state styles a different property, then the order does not matter. In the following case, the link styles could be given in any order and would still function:
:link {font-weight: bold;}
:visited {font-style: italic;}
:hover {color: red;}
:active {background: yellow;}
You may also have realized that the order of the :link and :visited styles doesn't matter. You could order the styles LVHA or VLHA with no ill effect. However, LVHA tends to be preferred because it was recommended in the CSS2 specification and also because the mnemonic "LoVeHA!" gained rather wide currency. (There's some bitterness out there, apparently.)

chriskq
01-02-2007, 11:21 PM
</rant ended>

domedia
01-03-2007, 01:38 AM
</rant ended> I told you it's a ruthless forum. If you make *one* mistake, you're gonna hear about it ;-)