differnt link styles for same link

admin

Administrator
Staff member
Say I have two class like this:<br />
<br />
link1:hover { stuff }<br />
link1:and so on<br />
<br />
link2:hover {different stuff }<br />
link2:and so on<br />
<br />
Then I have a link like this:<br />
<a href=http://www.htmlforums.com/archive/index.php/"somelink">Word#1 Word#2</a><br />
<br />
How can I make it so Word#1 has the styles of link1 and Word#2 has the styles of link2, but they are both one link?<br />
I can't have something like this:<br />
<a href=http://www.htmlforums.com/archive/index.php/"somelink" class="link1">Word#1</a><br />
<a href=http://www.htmlforums.com/archive/index.php/"somelink" class="link2">Word#2</a><br />
<br />
I hope that makes sense.<br />
<br />
Thanks,<br />
-IKLOP<!--content-->just use style attributes of hyperlinks<br />
here are examples<br />
<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"hello.html" style="font-size:10; font-weight:normal; color:blue">Hello</a><br />
<a href=http://www.htmlforums.com/archive/index.php/"hello.html" style="font-size:12; font-weight:bold; color:green">Hello</a><br />
<br />
<br />
style attributes allow you to dump your CSS into hyperlink, instead of control all hyperlinks from one location, this allows you to make a specific link unique from the rest of others<br />
<br />
hope this helps!<!--content-->That makes two separate hyperlinks that go to the same place. I need one hyperlink with different parts having different styles. For example, I could have a link like this:<br />
ONE TWO (<!-- w --><a class="postlink" href="http://www.somesite.com">www.somesite.com</a><!-- w -->)<br />
but 'ONE' has different styles than 'TWO', but they are one link, so no matter what part you hover over the style changes.<br />
<br />
It'skKinda hard to explain.<!--content-->Why can't you used:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"link1" class="link1">Words1</a> <a href="link1" class="link2" class="link2">Words2</a><br />
<br />
<br />
It doesn't put a space there, if that's what you're concerned about.<!--content-->Say the user hovers over Words2. Words2 would change to the hover style in class link2 but Words1 would still have the link style in link1, but I want it to get the hover style. Unless thats what that code does, but im pretty sure it doesn't, it just makes two differnt links, that link to the same place.<br />
<br />
Basically I want to have it so when you hover over a link, part of the link changes one color while another part of the link changes a different color. I probably should have said that in the beginning.<!--content-->O. I think this will work.<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"link"><span class="words1">Words1</span> <span clas="words2">Words2</span></a><!--content-->I originially tried that but it just uses the styles from my a class, ie. a:link {}, a:hover{}, etc.<br />
<br />
I then tried:<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"link.html"><a class="link1">Link1</a><a class="link2">Link2</a></a><br />
<br />
thinking it would use the link from the first a tag and the styles from the a tag around the part of the word, but that doesn't work either.<br />
:confused:<!--content-->
 
Back
Top