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,242 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,665 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)

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.