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?
 

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
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)
 
Soldato
Joined
3 Aug 2005
Posts
4,534
Location
UK
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. ;)
 

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
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
 
Soldato
Joined
3 Aug 2005
Posts
4,534
Location
UK
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
 

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
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
 
Associate
OP
Joined
16 Jun 2003
Posts
1,858
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