1

I have a div : <div id="fancyboxID-1"> <p>0767380042</p> </div> and this css:

​ #fancyboxID-1 p { font-size:150px; text-align: center; line-height:150px; overflow:hidden;}

After I upload and refresh the website I don't see any changes but if I check the source code: I see the css properties.

It's very strange for me, I've tried to upload on another server and there it works. Any ideas why this is not working ?

11
  • 2
    Caching is ruled out as you mentioned you see the CSS changes in the source code. It could be that the properties are getting overridden, did you try to inspect the element in question to inspect the properties ? Commented Sep 17, 2012 at 13:31
  • I've tried and I don't see any proprietes related to that div in Chrome console for example Commented Sep 17, 2012 at 13:39
  • 1
    Have you tried another browser? Have you explicitly cleared the cache? Is there more HTML/CSS than this? Commented Sep 17, 2012 at 13:46
  • I've cleared the cache, tried another browser and the same, it seems that is overriden by p css proprietes when I inspect element instead of showing #fancyboxID-1 p { } is just p Commented Sep 17, 2012 at 13:49
  • press ctrl+f5 then check may be its cache problem Commented Sep 17, 2012 at 13:49

2 Answers 2

1

Looking at your stylesheet (style.css) there appears to be some strange characters (corruption / unicode?) before your problematic line which is probably invalidating your stylesheet. Removing these characters results in your styles suddenly bursting to life...

When viewed with ISO-8859-1 encoding, they appear as 4 visible characters, although if viewed as UTF-8 it just looks like a single space (although it's not a single space):

​ #fancyboxID-1 p { font-size:150px; ... 

(Btw, hyphens in the id/class names are perfectly valid.)

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! This was the problem!
0

Are there any other styles\sheets that are overriding these changes? You said it works on other servers, so there must be something specific to the server youre hosting from.

If you use developer tools (F12 in IE or Chrome, Firebug in FireFox) you can browse to see if the changes are actually applied.. the code being present only means those styles are available, but something else might be enforcing different rules against that div, p, etc.

4 Comments

When I look in console the matched css rules are for p not for #fancyboxID-1 p
Can you share the URL? If not, have you had other internal\external users try?
Oh, and try getting rid of the dash in the name, just bc some characters cause weird stuff. Seems to me that your id isn't matching up from your styles.
here is the link click on the first icon on the footer (right)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.