Style Sheet not recognising new lines...

User 2080012 Photo

Registered User
13 posts

I came across a weird problem the other day. Sorted it myself but the forum users may be interested...
I like to hand write my own style sheets. One page I was writing needed a larger font size so I added a new line at the top of the *.css external sheet. it came up as the default size Times Roman and no matter what I tried it absolutely would not take (Century Gothic 72pt). No other styles were affected. What was weird is that if I doubled up the offending line in the style sheet, suddenly the correct font and size appeared.
What had happened is that I had accidentally pasted a short piece of code from another page at the top of the sheet (nothing to do with styles) and this must have been corrupting the scanning of the codes. What was strange also is that was in a line of notation which should have been ignored - also a tasteful shade of pale grey so not so easy to spot.
Seems like corrupt codes like this only affect the next line underneath and not the whole style sheet
User 379556 Photo

Registered User
1,328 posts

That sort of information can indeed be useful.

I wonder whether perhaps it's to do with the final character of the corrupt code - perhaps not a standard line ending, causing the next line to be treated by browsers as part of the corrupt code.
User 187934 Photo

Senior Advisor
19,931 posts

I would open a support topic if you can replicate.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
This is a site I built for use in my job.(HTML Editor)
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
User 2923147 Photo

Registered User
1 post

I had a similar problem today and I was able to solve it by deleting my history and reloading the page. I hope this helps!

My theory is that the page is remembering an older version of the style sheet and using that instead of updating to the new one on load. If that is the case adding this line of code under your <head> tag before deleting your history may help as well.

<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
User 122279 Photo

Senior Advisor
14,053 posts

I don't know if this applies, but you probably know that the letters 'CSS' stands for Cascading style sheet. The word Cascading is the important one here. Paul, who started this thread, said he was adding style rules at the top of his style sheet. Could it be that he had styled the same font differently further down? If so, the last styling 'wins'. It might have been better if his new styling had been inserted further down.
Ha en riktig god dag!
Inger, Norway
This site was made before we were able to create components through the app:
Component sharing for RFF, RBB, RSD and SD:
My work in progress right now:
Components for the same as above + HTML Editor:

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.