SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: CSS newbie quesion.
Hybrid View
-
Aug 16, 2000, 08:34 #1
- Join Date
- Feb 2000
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm new to CSS and I was wondering how to do the following:
I want the appearance of my links within my <p> tags to be different from those in the body. What's the selector to do this? I've tried p.a:link and other combinations but they don't work.
Thanks,
John
-
Aug 16, 2000, 08:51 #2
- Join Date
- Jan 2000
- Location
- natick, ma, usa
- Posts
- 23
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
i'm new to it too, but i *think* you'll need to define a class that has your atrributes in it.
for example if i define:
. plain { color: #0033CC; text-decoration: none; font-family: arial,helvetica,sans-serif; }
then i would put <a class="plain"> </a> around my link and it would show up with no underline.
is that what you're looking for?
-
Aug 16, 2000, 09:54 #3
- Join Date
- Jun 2000
- Location
- WA
- Posts
- 73
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, you're close, but things need to be in a bit different order. Define your regular links something link this:
A:link {color : #118811; text-decoration : none;}
A:visited {color : #660000; text-decoration : none;}
A:Hover {color : #0000AA; text-decoration : underline;}
And then define your alternate links something like this:
A.p:link {color : #444444; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;}
A.p:visited {color : #ffffff; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;}
A.p:hover {color : #0000AA; font-family : Verdana, Geneva, Arial, Helvetica, sans-serif; text-decoration : underline;}
Use your fonts, colors, and text decoration style obviously. Then in the anchor tag just add class="p" to each link you want to use the alternate link on and you'll be in business.
------------------
Bimjo
Bimjo's Corner
-
Aug 16, 2000, 16:57 #4
- Join Date
- Mar 2000
- Location
- Muskegon, MI
- Posts
- 2,328
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
A: Link, A: Visited, A: Hover are pseudo-class elements.
nothingmanjb, your question was on how to set text apart from other text within the <p> tag. Here is suggestion:
Body.normal {property:value; property:value;} then define your normal in the body tag <body class="normal"> this will set all text to your definition that falls in between <body></body>
P.exception {property:value;} whenever you want to change a certain paragraph add the 'exception' selector to the <p> tag. <P class="exception">
P.S. I just reread your questionI hope this helps anyway
------------------
IMHO,
Westmich
***********************
Your opportunity on the web is now!
westmichiganweb.com
[This message has been edited by westmich (edited August 16, 2000).]
-
Aug 16, 2000, 18:54 #5
- Join Date
- Feb 2000
- Posts
- 21
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks guys,
I'll try a few of the ways you listed and see which one works best for me.
John
Bookmarks