#1
  1. No Profile Picture
    Developer Shed
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Jan 2004
    Posts
    1,533
    Rep Power
    0

    Article Discussion: What is CSS?


    Style sheets are a very powerful tool for the Web site developer. They give you the chance to be completely consistent with the look and feel of your pages, while giving you much more control over the layout and design than straight HTML ever did.


    Read the full article here: What is CSS?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0

    Exclamation Question on css


    How can I hide my style sheets from public download?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    300
    Rep Power
    11
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0

    Exclamation css


    There has got to be a way. I assume I will have to write a script that performs this task then.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    2
    Rep Power
    0
    Originally Posted by chantalrosa
    There has got to be a way. I assume I will have to write a script that performs this task then.
    Why would you want to hide your CSS? The language is so simple, anyone with a grammar school education can write it.

    df
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2004
    Posts
    5
    Rep Power
    0

    Wink Hiding CSS -- why?


    Originally Posted by chantalrosa
    There has got to be a way. I assume I will have to write a script that performs this task then. :eek:
    As stated by other poster, you can't. What you can do, if you want to be annoying, is something like this (and this is just a thought, haven't tested it):

    Main file needs an empty <style>-container, placed last in the <head>-container, and some JS to generate an iframe:
    Code:
    <script type="text/javascript">
        var anIframe = document.createElement('iframe');
        anIframe.setAttribute('src', 'another_nasty_javascript_thingy');
        anIframe.setAttribute('id', 'nasty_stuff');
        anIframe.style.display = 'none';
        document.body.appendChild(anIframe);
    </script>
    another_nasty_javascript_thingy:
    Code:
    <script type="text/javascript">
        parent.document.documentElement.firstChild.lastChild.innerHTML = document.getElementById('divWithStyle').innerHTML;
    </script>
    <div style="display: none" id="divWithStyle">
        * { font-family: courier } // etc...
    </div>
    ... then again, maybe you could just play with the rest of us and code a good-looking file with well-defined styles and stuff. It's not like you can't steal the CSS after the page has been rendered in a browser (and is thus completely out of your control) :).

IMN logo majestic logo threadwatch logo seochat tools logo