prob: two different a href= styles

Associate
Joined
16 Jun 2003
Posts
1,858
I'm needing to have a couple of options of formating the ahref= links, as I need the text to be two diffrent size depending upon where it is on the site.

Is it possible? I've tried a few things .. but what looks good on IE, doesn't work on firefox.

any ideas?
 
define classes?

Code:
.thisOne a {
style info here
}
.thatOne a {
style info here
}

Code:
<a href="blah.html" class="thisOne">blahdeeblah</a>
<a href="bluh.html" class="thatOne">bluhdeebluh</a>

just make sure that you haven't got any definitions of your a tags in any parent divs, or the formatting won't work (in my experience)
 
Sic said:
define classes?

just make sure that you haven't got any definitions of your a tags in any parent divs, or the formatting won't work (in my experience)
I think you'll find thats:

Code:
a.thisOne {
style info here
}
a.thatOne {
style info here
}

av. ;)
 
Al Vallario said:
I think you'll find thats:

Code:
a.thisOne {
style info here
}
a.thatOne {
style info here
}

av. ;)

think you'll find they both work. i use my version on my site and it works perfectly
 
Sic said:
think you'll find they both work. i use my version on my site and it works perfectly
The CSS you posted wouldn't work with the HTML you put it with. Your CSS declarations were essentially saying "For any anchor tag within an element with the class..." where they should say "For any anchor tag with the class..."

Edit: Either that or there's some strange rule (which goes against common sense) I have overlooked :p
 
Al Vallario said:
The CSS you posted wouldn't work with the HTML you put it with. Your CSS declarations were essentially saying "For any anchor tag within an element with the class..." where they should say "For any anchor tag with the class..."

Edit: Either that or there's some strange rule (which goes against common sense) I have overlooked :p

i haven't got the energy to check it - i'll take your word for it :p
 
Yes, a space is a descendant selector, so .thisOne a will only apply to any <a> element that is a descendant of an element with a class of "thisOne" :).
 
thanks to all, your advice worked ... a little testing ... and it works brilliantly!

not an easy thing to do .. and requires a little fiddling ... but hey!

thanks again
 
Back
Top Bottom