|
-
CSS & Hyperlinks
I need to create a web page that displays two different styles of hyperlinks. I'd imagine one would use CSS to do this. I can create one style of a hyperlink by doing the following:
a { text-decoration: none; color="#000000" }
a.l { color: #000000; text-decoration: none }
a.l2 { color: #000000; text-decoration: none }
a.m { color: #000000; text-decoration: none }
a:hover { color: #000000 }
but this lets me use one style for the whole page. How could I create a class that allows me to use two(or more) different styles?
------------------
- jeste®
How could tomorrow ever follow today?
- jeste®
How could tomorrow ever follow today?
-
Ex-***
You have to actually name the class for each <a href> tag to make it work, like so:
Say you have two sets of links attributes:
a {text-decoration:underline;}
a.two {text-decortation verline;}
All links will be underlined now.If you want the links to have overline you have to do it like this:
<a class=two href=http://bla.bla.bla>blabla</a>
Hope this helps.
------------------
Now listening to:
Røyksopp - Apple
[This message has been edited by kid A (edited January 05, 2001).]
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
Originally posted by kid A:
You have to actually name the class for each <a href> tag to make it work, like so:
Say you have two sets of links attributes:
a {text-decoration:underline;}
a.two {text-decortation verline;}
All links will be underlined now.If you want the links to have overline you have to do it like this:
<a class=two href=http://bla.bla.bla>blabla</a>
Hope this helps.
Hey, thanks! I've been trying all kinds of things to get that functionality to work. I was actually interested in the hover attribute which was
a:hover.two { color: #FFFFFF }
and it worked.
------------------
- jeste®
How could tomorrow ever follow today?
- jeste®
How could tomorrow ever follow today?
-
Ex-***
Yeah I forgot to mention that, but it's the exact same thing (as you found out) 
------------------
Now listening to:
Røyksopp - Apple
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
Reef Shark
I was trying to figure out how to do thisas I forgot, I'm glad I know how to do it again.
God damnit, better graphics != revolutionary gaming! Get it through your skull!
-
Originally posted by Pestilence:
I was trying to figure out how to do thisas I forgot, I'm glad I know how to do it again.
Its a nice feature. Lets you create a seperate file and import it into each web page that you have. That way all of your fonts are the same.
------------------
- jeste®
How could tomorrow ever follow today?
- jeste®
How could tomorrow ever follow today?
-
Ex-***
Originally posted by jester:
Its a nice feature. Lets you create a seperate file and import it into each web page that you have. That way all of your fonts are the same.
You mean
<link rel=stylesheet href=../styles.css type=text/css>
?? - That's a really good feature. I started making separate style sheets for each page, but that's just a complete waste of time. Using the above method it great for getting the same styles on all pages. 
------------------
Now listening to:
Røyksopp - Apple
[This message has been edited by kid A (edited January 10, 2001).]
Now listening to various rock and metal
143rd member to join Sharkyforums.
-
Originally posted by kid A:
You mean
<link rel=stylesheet href=../styles.css type=text/css>
?? - That's a really good feature. I started making separate style sheets for each page, but that's just a complete waste of time. Using the above method it great for getting the same styles on all pages. 
Thats the guy I was talking about. He's a life saver. Well, maybe not a life saver, but darn close to it.
------------------
- jeste®
How could tomorrow ever follow today?
- jeste®
How could tomorrow ever follow today?
-
Tiger Shark
I'm a little bit lazy... I just call all my pages .asp even style.asp then I just do a <!--#include ...-> at the top of all the pages that need to use style.asp. Even then you could name it .css, but whats the point?!
XP 1600+
MSI KT333
512 PC2700
AOpen Geforce4 4200
-
Originally posted by GrayCalx:
I'm a little bit lazy... I just call all my pages .asp even style.asp then I just do a <!--#include ...-> at the top of all the pages that need to use style.asp. Even then you could name it .css, but whats the point?!
It may not be a big deal, but the difference is in the output. In your #include statement, the actual source is put into the "View Source" output. When you use the method described in the previous posts, there is no source output. The only way a person can get the source is to actually put the exact URL into the address bar. But no biggie.
------------------
- jeste®
How could tomorrow ever follow today?
- jeste®
How could tomorrow ever follow today?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|