Hi guys,
I'm having trouble targeting a specific element in facebook. The 2 elements in grey circled in red in the screen shot are what I'm trying to change to white. So far I found "a._4o-f" which I tried changing the color but doesnt work. Whats the code for this? Thanks guys.
Comments
Identifiers beginning with underscores are reserved for vendor specific purposes and must be escaped for custom use:
.\_4o-f
Eh? I'm even giving a solution!
And again: Time to learn your selectors!
Eh? I'm even giving a solution!
Hi stonecrusher,
No offense but I dont understand what youre trying to say.
I did use a selector with "a" as in "a._4o-h" according to the link you provided. But that doesnt work either. This is an area of css I definitely want to learn. I'll try my best to learn.
I tried that code before the same way you entered it and it doesnt work. Hope theres another way.
Shouldn't it be: [.class="_4o-f"] rather than [class="_4o-f"] ? I think you're missing a period before "class". Either way i tried it and still no go.
I'm not offended, but it's really time consuming and unnecessary to explain absolute basics here.
Please go through a CSS tutorial. I don't have a recommendation, because I never went through such a tutorial in english language and I don't recommend something that I didn't use by myself. But there are tons of them on the net. Just looking over it, I'm not a fan of the w3schools stuff.
No. The selectors reference I linked clearly says it's
[attribute=value]
.My proposal was to try
The
a
in front that limits the selection to elements with thea
-tag is highly probable unnecessary, as those cryptic facebook classnames look unique.Spot the difference:
div.blaaah
selects alldiv
that have the class "blaaah"div .blaaah
selects all elements that have the class "blaaah" and which are direct or indirect childs of adiv
(meaning: somewhere inside adiv
).I tried that but still doesnt work.
It works.
Then your problem is somewhere else.
As the fiddle shows, the CSS specifications seem to have been updated and at least in my browser it also works without escaping the underscore by prefix with
\
. That wasn't the case in the past.I'll investigate this. Thanks man!
Wow! Thanks man that worked! Inspector doesnt bring this up.. How did you find this??
What I want to know is, why didnt you use "div._2p4n"? Or "._2pn4 ._2ieq" since thats whats shown in inspector for the entire code for that element?
Btw its hard to get the right code for some elements that hover cuz as soon as you move the mouse from the element to see what code it is in inspector, quickly after inspector vanishes. Wish there was a fix for that.
div._2p4n
means you target class ._2p4n AND it has to be a div._2pn4 ._2ieq
means you target class ._2ieq AND it has to be somewhere inside a class ._2pn4as those classes are pretty unique you don't need to be too restrictive and it's ok to just target the class. Same as above.
Thanks for the info. I'll try to remember this. Thanks.
Hope you can help me with a FB issue I'm having. heres my thread:
https://forum.userstyles.org/discussion/62463/facebook-pics-dont-align-correctly?new=1