think tank forum

technology » css value override

lucas's avatar
13 years ago
link
lucas
i ❤ demo
* {
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    font-weight: normal;
}

strong {
    font-weight: bold;
}


then the strong tag doesn't make things bold.

strong {
    font-weight: bold;
}

* {
    padding: 0 0 0 0;
    margin: 0 0 0 0;
    font-weight: normal;
}


this doesn't work either.

help!
psquid's avatar
13 years ago
link
psquid
something something something EXPLOSION
Try adding !important to the font-weight in strong, like so:
strong {
    font-weight: bold !important;
}

That should make it override any other font-weight setting on elements it gets applied to (unless you have others also important and applied to it; then it just gets confusing).
Carpetsmoker's avatar
13 years ago
link
Carpetsmoker
Martin
Funny, I struggled with the same issue yesterday, I also just added the !important and that works, but it doesn't sit well with me ...
lucas's avatar
13 years ago
link
lucas
i ❤ demo
yeah, me neither. it's like * {} is acting as some kind of superior element. sucks

i can do p { padding: 2em; } and it works--it overrides * {} like it should. bah
psquid's avatar
13 years ago
link
psquid
something something something EXPLOSION
No kidding. It feels hacky, and I'd definitely try to shift the styles around to get the right result that way, before resorting to !important.
maple's avatar
13 years ago
link
maple
i like large datasets
just use yui reset or something
Carpetsmoker's avatar
13 years ago
link
Carpetsmoker
Martin
Javascript to fix broken CSS :( God just killed a kitten.