Any Advice? I want to prevent my css from displaying in View Page Source

bsugar

Member
Hi guys,

Can anyone advise on how I can do this please? I don't fancy my css showing when most sites do not show theirs. Any help, as usual will be great :icon_biggrin:
 
You can have your styles in an external stylesheet:

<link rel="stylesheet" href="styles.css"/>

That way it's not immediately visible in 'view page source', but all anyone has to do is to open that file to see it.

Ultimately the browser has to see the css to use it which means there is no real way to hide it.

You could use a 'minify' utility it to make it harder to read.

But, to be honest, looking at your previous posts I don't think anyone is going to be stealing your css any time soon. There's lots of really good css out there that people are giving away.
 
Thanks for those tips Things to Do & Corrosive :thumb:

I already had my styles on an external style sheet but I realise what I did now.

I was in Dreamweaver and looking at one of my pages through one of its browsers. I then selected view page source. I wasn't actually looking at the page on my server (if that makes sense).

Thanks again
 
Back
Top