Ben Hili
Ben Hili

Reputation: 135

Changes to CSS in inspector stylesheet apply but those same changes will not apply in my CSS file

Bit of a strange occurrence with my web page, currently trying to resize the font of a facebook like button I have on my website.

Currently the HTML I'm targeting is:

<span id="u_0_3">2.1k people like this. Be the first of your friends.</span>

In the google chrome console adding either of the following will change the font

1.

#u_0_3 { font-size: 14px }

2.

span#u_0_3 { font-size: 14px }

but adding either of these lines of code to my web pages stylesheet has absolutely no effect. No clue how to proceed from here as it works in one stylesheet and not the other?

Upvotes: 0

Views: 794

Answers (2)

Nikki Mather
Nikki Mather

Reputation: 1148

The reason the styles aren't updating when adding the code to your stylesheet as opposed to in the browser is because you're trying to a stylesheet on an iframe, which isn't possible. You can however add the styles using jQuery or something along those lines.

Try this...

$("iframe#idhere").contents().find("span#u_0_3").css('font-size', '14px');

Upvotes: 2

Kalyan
Kalyan

Reputation: 1200

Ensure that you have added CSS file reference in your HTML.

Also, clear browser cache and load the page.

Upvotes: 0

Related Questions