GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   CSS class cannot unbold a link. (https://gfy.com/showthread.php?t=999195)

nico-t 11-25-2010 11:33 AM

CSS class cannot unbold a link.
 
Weird, links within div class tags (class small) with this css:

.small {
color: Silver;
font-weight: normal;
font-size: 11px;
}

.small a {
color: Blue;
font-weight: normal;
}


Are still bold. Because the wrapper div has all links bold. I thought this should override it? It overrides the color fine.... why not the 'normal' font weight?

MetaMan 11-25-2010 11:36 AM

you can go like:

<div style="font-weight:normal;">text here</div>

to see if it overrides it. it shouldnt get the bold from the wrap but i cant see the entire code so hard to say.

MetaMan 11-25-2010 11:42 AM

.small {
font: normal 12px Arial, Helvetica, sans-serif;
}

is so much cleaner also

redwhiteandblue 11-25-2010 11:50 AM

What browser? Looked at it in Firebug to see what its properties actually are? Tried setting it in the link pseudo-classes?

nico-t 11-25-2010 12:05 PM

I had to change the ".small" from a class to a div id, and the a to the more specific a:link for it to work. Like this (and ofcourse change the "div class=" to "div id=" in the html tags around the links i wanted to change):

#small {
color: Silver;
font-weight: normal;
font-size: 11px;
}

#small a:link {
color: Blue;
font-weight: normal;
}

dont know why a class doesnt work but hey, this works too.

pornpf69 11-25-2010 01:36 PM

could have been easily solved by adding a small thing: !important;
.small a {
color: Blue;
font-weight: normal !important;
}

not that hard...

brandonstills 11-25-2010 03:32 PM

It may be a problem of specificity. I run into these problems occasionally. They are so annoying.

http://css-tricks.com/specifics-on-css-specificity/

Basically the solution is to put the tag hierarchy in front of it or to use id's. If the specificity value is too low it won't pick it up.

FlexxAeon 11-25-2010 03:46 PM

the sad part is that with all of these different solutions, no one is 'more correct' than another :1orglaugh


All times are GMT -7. The time now is 03:51 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123