Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
HTML Link Help
Topic Started: Dec 3 2008, 03:00 PM (705 Views)
icey dan
Member
 *   *  
This is my test board:

http://z8.invisionfree.com/IceyGames/index.php

I'm trying to get a link so that when i put a colour on it, it will still change colour to show there is a link. (when you hover your mouse over it)

I tried this code, but it makes ALL the links on the page go one colour, rather than just the text it's over

This is the code i tried:
Quote:
 
<STYLE>
A:link {font-weight:bold}
A:hover {background:yellow; color:black;}
A:visited {color:green}
A:active {color:red}
</STYLE>


Please help!
Edited by icey dan, Dec 3 2008, 03:14 PM.
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
Anyone?
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

I'm a little unsure of what you are explaining, but:

Remove the code you posted from your wrappers, then navigate to your stylesheet.

At the top of the stylesheet you will see:
Quote:
 
a:link, a:visited, a:active { text-decoration: none; color: #6D6D6D}
a:hover { color: #A6A6A6; text-decoration:none}
Edit the bold part to have a hover colour.
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
No i don't want ALL the text on my board to have a hover colour.

I mean like this:

If i use this code:

<font color="#990000">TEST TEXT </font>

If i apply a link to the words "TEST TEXT" when i hover my mouse over, it will NOT change colour.

Do you know if it's possible to make it change colour, like when you hover your mouse over default text on the board?
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

One way to do it (to allow lesser ie versions to work) will be to add the links into span tags, then define everything in your stylesheet.

Add your text where ever you want it:
Quote:
 
<span class="et">oops wrong planet, i need a <a href="home">phone</a>.</span>
Then add the following to your stylesheet:
Quote:
 
.et a:hover { color: #900; text-decoration: underline; }
Feel free to change the class names. et is just an example.
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
Tony
Dec 6 2008, 12:23 AM
One way to do it (to allow lesser ie versions to work) will be to add the links into span tags, then define everything in your stylesheet.

Add your text where ever you want it:
Quote:
 
<span class="et">oops wrong planet, i need a <a href="home">phone</a>.</span>
Then add the following to your stylesheet:
Quote:
 
.et a:hover { color: #900; text-decoration: underline; }
Feel free to change the class names. et is just an example.
I put this code at the bottom of my CSS:

Quote:
 
.et a:hover { color: #FFFFFF; text-decoration: underline; }



and this under my board header:

Quote:
 
<span class="et"><span style='color:#1569C7'>oops wrong planet, i need a <a href="home"><span style='color:#1569C7'>phone</span></a>.</span></span>


But it still does not change colour when i hover my mouse over
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

That's because you have gave the link text a colour with the third span tag.

Follow my example and it will work.
Quote:
 
<span class="Your class name here">Your text here <a href="Your link here">Your link text here</a>Your text here.</span>
Stylesheet:
Quote:
 
.Your class name here { color: #900; }
.Your class name here a:hover { color: #fff; text-decoration: underline; }
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
Sorry but it still doesn't work :(

Here is what i put in CSS: (at the bottom)

Quote:
 

.test1 { color: #6D6D6D; }
.test1 a:hover { color: #FFFFFF; text-decoration: underline; }


Header & Body:

Quote:
 
<span class="test1">haha1 <a href="http://z8.invisionfree.com/IceyGames/">Clickhere</a>haha2</span>
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

See, also, your other topic on this issue. :ermm:

The html and css works for me. There may be a conflict at your end.
Offline Profile Quote Post Goto Top
 
Cory
Member Avatar
Member
 *   *   *   *   *   *   *   *   *  
Add those two strips of CSS above the </style> tag in your CSS; they're currently added below the JavaScript.

Also add the following tag to the very bottom of your style sheet.
Code:
 
<style type="text/css">
The .test1 a:hover strip applies a hover color to the link within those span tags. In accordance to this post it appears you're wanting to add a hover color to the text alone and not the link, am I correct?
Quote:
 
Text Link Text
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
It's getting so confusing.

All i want is code, so that when i put my mouse over a piece of text which has a link, it changes colour. I want to be able to set that colour.

I don't know how to make it clearer

I tried what you said, it still does not work

Please could someone help :(
Offline Profile Quote Post Goto Top
 
Tony
Member Avatar
If found, please report missing.

I apoligise for the time taken to solve your issue. Take a look at the bottom of your style sheet for:

Spoiler: click to toggle

Then replace it with the following:

Spoiler: click to toggle

I hope that helps to clear things up. :)
Offline Profile Quote Post Goto Top
 
icey dan
Member
 *   *  
Wow it works!!!!
Thank you so much my good friend !
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · zIFBoards - Skinning & Code Support · Next Topic »
Add Reply