Reply Thread Tools Search this Thread
Old 30-10-2008, 21:03   #1 (permalink)
shaftb
Senior Member
 
shaftb's Avatar
 
Join Date: Jul 2006
Location: United States
Posts: 602
Send a message via AIM to shaftb
CSS : Different <p> properties in same Style Sheet?

I'm creating a page that has a light bkg for the content area, and a darker footer. So when I apply a color to a link let's say, it's fine in the content, but can't view in the footer because of the colors. Is there a way to have two separate link class styles? One that calls out for the <p> text in the footer, and one for the content area?
__________________
+++++
  Reply With Quote
Old 30-10-2008, 21:05   #2 (permalink)
blrjohn
Registered User
 
blrjohn's Avatar
 
Join Date: Aug 2007
Posts: 70
I think this link will help you

Linking Color Problem
  Reply With Quote
Old 30-10-2008, 21:10   #3 (permalink)
INXS
Soy Chingon!
 
INXS's Avatar
 
Join Date: Sep 2008
Location: Washington, D.C.
Posts: 595
Send a message via MSN to INXS
yes, you have to class your footer, and code it in your external css.

option 1 (example, just code to your liking)
<div id="footer">blah blah</div>

css: #footer { text-color: #000; align: center }

OR

option 2

<div id="footer"><p class="footer">blah blah</p></div>

css: #footer { text-color: #000; align: center }
p.footer { text-color: #000; }
__________________
  Reply With Quote
Old 30-10-2008, 21:28   #4 (permalink)
shaftb
Senior Member
 
shaftb's Avatar
 
Join Date: Jul 2006
Location: United States
Posts: 602
Send a message via AIM to shaftb
Quote:
Originally Posted by blrjohn
I think this link will help you

Linking Color Problem

Alright, but in my HTML how do I set that so it recognizes that?
Thanks.
__________________
+++++
  Reply With Quote
Old 30-10-2008, 21:38   #5 (permalink)
INXS
Soy Chingon!
 
INXS's Avatar
 
Join Date: Sep 2008
Location: Washington, D.C.
Posts: 595
Send a message via MSN to INXS
i think i just gave you the answer

class your footer, and code it in css. look at my example above.
__________________
  Reply With Quote
Old 30-10-2008, 21:43   #6 (permalink)
shaftb
Senior Member
 
shaftb's Avatar
 
Join Date: Jul 2006
Location: United States
Posts: 602
Send a message via AIM to shaftb
Sorry.. yes you did. What I am wondering though is above...blrjohn's example. That is what I was curious about.
I can make separate colors for regular text, it's the links that I want to be different. My links in the content and the footer stay to whatever the a:link attribute is.
__________________
+++++
  Reply With Quote
Old 30-10-2008, 21:55   #7 (permalink)
INXS
Soy Chingon!
 
INXS's Avatar
 
Join Date: Sep 2008
Location: Washington, D.C.
Posts: 595
Send a message via MSN to INXS
use the same shit man.

p.footer a:link { CSS CODE }
p.footer a:hover { CSS CODE }
p.footer a:active { CSS CODE }
__________________
  Reply With Quote
Old 30-10-2008, 22:14   #8 (permalink)
seen.to
unusual suspect
 
seen.to's Avatar
 
Join Date: Jul 2004
Location: DE, USA
Posts: 5,934
Quote:
Originally Posted by INXS
yes, you have to class your footer, and code it in your external css.

option 1 (example, just code to your liking)
<div id="footer">blah blah</div>

css: #footer { text-color: #000; align: center }

OR

option 2

<div id="footer"><p class="footer">blah blah</p></div>

css: #footer { text-color: #000; align: center }
p.footer { text-color: #000; }

text-color? Really? Are you sure?
__________________
"I am better than you think I am but not as good as I think I am."
~Bishop

[[proverbs and quotes]] [[blog]] [[work]] [[photowebby - some photo's by me]] [[doodls - my doodles]]
  Reply With Quote
Old 30-10-2008, 22:46   #9 (permalink)
blrjohn
Registered User
 
blrjohn's Avatar
 
Join Date: Aug 2007
Posts: 70
HTML Code:
.foottext {color: #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif;} .foottext a:link{text-decoration:none;color:#000000;} .foottext a:visited{text-decoration:none;color:#000000;} .foottext a:active{text-decoration:none;color:#000000;} .foottext a:hover{text-decoration:underline;color:#FFFFFF;}

make ur css like above
you can give ur own color for a:link, a:visited, a:active, a:hover
  Reply With Quote
Old 30-10-2008, 23:48   #10 (permalink)
INXS
Soy Chingon!
 
INXS's Avatar
 
Join Date: Sep 2008
Location: Washington, D.C.
Posts: 595
Send a message via MSN to INXS
Quote:
Originally Posted by seen.to
text-color? Really? Are you sure?

i was making a mock up, maybe you didn't read my statement in parenthesis.
__________________
  Reply With Quote
Old 31-10-2008, 00:22   #11 (permalink)
seen.to
unusual suspect
 
seen.to's Avatar
 
Join Date: Jul 2004
Location: DE, USA
Posts: 5,934
Quote:
Originally Posted by INXS
i was making a mock up, maybe you didn't read my statement in parenthesis.

But 'text-color' doesn't exist so perhaps not that useful as an example of a way to do something.
__________________
"I am better than you think I am but not as good as I think I am."
~Bishop

[[proverbs and quotes]] [[blog]] [[work]] [[photowebby - some photo's by me]] [[doodls - my doodles]]
  Reply With Quote
Old 31-10-2008, 00:58   #12 (permalink)
INXS
Soy Chingon!
 
INXS's Avatar
 
Join Date: Sep 2008
Location: Washington, D.C.
Posts: 595
Send a message via MSN to INXS
Quote:
Originally Posted by seen.to
But 'text-color' doesn't exist so perhaps not that useful as an example of a way to do something.

o'rly?
__________________
  Reply With Quote
Old 31-10-2008, 01:22   #13 (permalink)
herkalees
Semantics, yay.
 
herkalees's Avatar
 
Join Date: Nov 2005
Location: Beverly, Massachusetts
Posts: 1,615
Um, no. First, the footer should be given an ID, since it's highly likely it's the only footer on the page. Second, you don't just slap text in a div, you slap it into something semantically correct.

HTML:
HTML Code:
<p>This is body text and here's <a href="#">a link</a>.</p> <div id="footer"> <p>This is footer text and here's <a href="#">a link</a>.</p> </div>

CSS
Code:
p a {color:red;} #footer p a {color:green;}
__________________
  Reply With Quote
Old 31-10-2008, 05:42   #14 (permalink)
Synook
What happened?
 
Synook's Avatar
 
Join Date: Jul 2008
Posts: 2,159
Quote:
Second, you don't just slap text in a div, you slap it into something semantically correct.
And valid

border-color inherits color, interestingly enough.
__________________
Web developer • AspektasBlogTwitter


  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8