Author |
Topic |
Ryan
Average Member
USA
858 Posts |
Posted - 24 October 2003 : 11:02:10
|
I know how to make the link line under links disappear. However that is on normal links. I would like to make it so that when you hover over it the link disappears. I want to do that on all links. Where and can I add it to this line (the setting for text and link colors): <BODY text=#111111 vLink=#11111l link=#111111 aLink=green hLink=green bgColor=#fffff2> ? Thanks. |
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 24 October 2003 : 11:08:02
|
easiest way would be to set up two classes (one for mouseout and one for mouseover)
for instance .linkon {text-decoration: none;} .linkoff {text-decoration: underline;}
then the link would look like: <a class="linkoff" ahref="whatever.htm" onMouseOver="this.className='linkon';" onMouseOut="this.className='linkoff';">
scratch that ... i didn't see you wanted to do it on all links ...
do this instead. put the following in your style section: A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; }
you can then add additional styles to the links as necessary. |
Nikkol ~ Help Us Help You | ReadMe | 3.4.03 fixes | security fixes ~ |
Edited by - Nikkol on 24 October 2003 11:17:50 |
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 24 October 2003 : 11:19:52
|
You'd have to call a JavaScript function onMouseOver which changes the style on anchor tags
I thought you meant you wanted to remove all links onmouseover! |
The UK MkIVs Forum |
Edited by - DavidRhodes on 24 October 2003 11:36:26 |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 11:23:04
|
quote: Originally posted by Ryan
I would like to make it so that when you hover over it the link disappears.
Can you clarify that? Are you asking how you can make a link 'disappear'? Or did you mean to write line? |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 24 October 2003 11:24:13 |
|
|
Ryan
Average Member
USA
858 Posts |
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 24 October 2003 : 11:30:44
|
the answer is in Nikkol's post above... |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 11:38:24
|
quote: Originally posted by RichardKinser
the answer is in Nikkol's post above...
Your response reminds me of a feature that I've seen at other technical support forums where the Accepted Answer is highlighted and the person that gave the answer has their proficiency rating go up. It would be a nice feature here, although probably not all that necessary. |
|
Edited by - dayve on 24 October 2003 11:39:07 |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 11:42:19
|
Personally, I prefer the shorter version which makes better use of CSS 'cascading' abilities:
A { text-decoration:underline; } A:hover { text-decoration:none; }
|
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 24 October 2003 11:43:41 |
|
|
Ryan
Average Member
USA
858 Posts |
Posted - 24 October 2003 : 11:44:12
|
<BODY text=#111111 vLink=#11111l link=#111111 aLink=green hLink=green bgColor=#fffff2> <style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:brown; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; } } --> </style> That didnt seem to do it |
The Poultry Link - "Serving the best of the fancy with the best of the web" Forum Setup Help |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 11:46:10
|
you nested your CSS which is incorrect
this:
<style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:brown; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; } } --> </style>
should look like this instead
<style> <!-- BODY{ scrollbar-face-color:#fffff2; scrollbar-arrow-color:brown; scrollbar-track-color:#EEEEEE; scrollbar-shadow-color:''; scrollbar-highlight-color:''; scrollbar-3dlight-color:''; scrollbar-darkshadow-Color:''; }
A:link { text-decoration:underline; } A:visited { text-decoration:underline; } A:hover { text-decoration:none; } A:active { text-decoration: none; } --> </style>
you can also remove the properties from your BODY tag although there might be some NON CSS compliant browsers out there. I still never use the body declaration though.
|
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 11:47:28
|
btw Ryan, I think you should really visit this site more often: http://www.w3schools.com
most of the questions I've seen you ask lately can be answered here. plus it is a decent reference site.
another site you should check out is http://www.devguru.com |
|
|
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 24 October 2003 : 11:49:50
|
The styles should also go in the HEAD of the document although it will still work either way |
The UK MkIVs Forum |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 11:51:08
|
Dayve: Two of my top code reference sites they are too! Ryan: Place the <Style> definition inside the <head></head> tags. (oops, sorry David) |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
Edited by - D3mon on 24 October 2003 11:53:14 |
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 24 October 2003 : 11:52:53
|
quote: Originally posted by DavidRhodes
The styles should also go in the HEAD of the document although it will still work either way
good point... another tip is:
1. Create an external CSS file and link to it. Example:
<LINK href="style.css" rel="stylesheet" type="text/css">
This makes it easy to use the CSS Library on all of your web pages with one line. |
|
Edited by - dayve on 24 October 2003 11:54:05 |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
Posted - 24 October 2003 : 11:55:22
|
quote: Originally posted by dayve
good point... another tip is:
1. Create an external CSS file and link to it. Example:
<LINK href="style.css" rel="stylesheet" type="text/css">
This makes it easy to use the CSS Library on all of your web pages with one line.
In which case, you dont need these lines in the external file:
<style> <!--
--> </style> |
Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod "In war, the victorious strategist only seeks battle after the victory has been won" |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 24 October 2003 : 12:43:39
|
quote: Originally posted by dayve Your response reminds me of a feature that I've seen at other technical support forums where the Accepted Answer is highlighted and the person that gave the answer has their proficiency rating go up. It would be a nice feature here, although probably not all that necessary.
Funny, I was thinking the same thing while browsing another forum with the same feature (or, perhaps, it was the same forum. ), it enables newbies to see exactly who is the most knowledgable on a given subject as post counts do not always reflect this. Maybe an idea to try and introduce something along those lines here?
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
Topic |
|