Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Website Coding & Programming Forum:' started by bsugar, Feb 17, 2013.

  1. bsugar

    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:
     
  2. thingstodo

    thingstodo Member

    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.
     
  3. Corrosive

    Corrosive Moderator Staff Member

    Just going to alter your answer a bit there thingstodo :icon_biggrin:

     
  4. bsugar

    bsugar Member

    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
     

Share This Page