Welcome to WebmasterWorld Guest from 54.163.68.15

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

Linking

only underlines link when rollover

   
10:19 am on Feb 19, 2003 (gmt 0)

10+ Year Member



How do you hyperlink text so that it will only underline the link (and change its color) when you rollover it? Again, this is text, not a jpeg or gif image.

I am using Dreamweaver MX.

Thanx.

10:35 am on Feb 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



you need to use a style sheet

something like

<style type="text/css">
<!--
a:link {
text-decoration: none;
}

a:hover {
color: #FF0000;
text-decoration: underline;
}
-->
</style>

Daven

10:40 am on Feb 19, 2003 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



In Dreamweaver go to the CSS window, click on the create a new style option and choose Use CSS Selector. That gives you the option of:

a:link
a:visited
a:hover
a:active

You can now style your links in whatever way you want. There is a choice for underline within Type.

The hover is the one for the mouse over. You should use the ordering as above in your CSS, as this ensures the correct colour cascade.

HTH

11:15 am on Feb 19, 2003 (gmt 0)

10+ Year Member



Thanx a lot, guys.

BlobFisk, could you explain a little more? I got to the "New CSS Style" window that you suggested, but when I selected the first option, a: link, and clicked OK, it wanted me to save it as a new style sheet. I did't even get to tell it what to do for that option (if that is how it works). Would you mind walking me thru an example?

11:38 am on Feb 19, 2003 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



No bother:

You have a choice when you are specifying the first style in a DW document - do you want the CSS information to go on the <head> of the page, or do you want to link to an external CSS. That choice is yours, but I prefer external CSS.

When you get the New Style Window you have a choice to Define In a New Style Sheet File or This Document Only. Go ahead and choose New Style Sheet File.

You will then be asked to give it a name and save it. Once you do this, DW will present you with the Style pane and you can apply whatever styles you want.

Once you are finished, click OK! The next time you go to insert a style, it should automatically to pointing at this new external css file of yours.

HTH

1:05 pm on Feb 19, 2003 (gmt 0)

10+ Year Member



Great. Thanx. Do you happen to know how to take away the underlining from the link at the a: link stage?

I did not select "underline", but it still underlined the link like a normal hyperlink.

I have to turn in, but if you get a chance to answer this, I will read your answer tomorrow.

Thanx in advance!

1:17 pm on Feb 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Select none for all all link options except hover.