Web Analytics Made Easy -
StatCounter How can you view css source? - CodingForum

Announcement

Collapse
No announcement yet.

How can you view css source?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can you view css source?

    I hope that this isn't a dumb question. Is it possible to view the source for an external stylesheet? How do you do this?

    I know how to view the html source (right-click on the page and choose "View Source". But when the html references an external stylesheet:

    Code:
    <link rel="stylesheet" type="text/css" media="screen" href="layout.css">
    I am most interested to see the layout.css code.

    I am new to css and I feel I have only scratched the surface of this tool.

  • #2
    In the address bar delete the name of the page and type in the content of the href attribute
    Or
    Use the Save As feature of your browser to save all page files to a local folder.
    Vladdy | KL
    "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

    Comment


    • #3
      The easiest way would be to use a bookmarlet such as my ViewStyles bookmarklet. Go to <http://liorean.web-graphics.com/> and drag the ViewStyles bookmarklet to your personal bar/links bar, and then click it when you want to see the external stylesheets used on a page.


      Vladdy: Using the Save As feature would give you only the styles that iew understands, if that happens to be the browser you're using. Other browsers will give the real source, though.
      Last edited by liorean; Feb 22, 2004, 10:21 AM.
      liorean <[[email protected]]>
      Articles: RegEx evolt wsabstract , Named Arguments
      Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
      Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

      Comment


      • #4
        still having problems with this....

        For example, I go to www.robinzclark.com/header.css

        I know that this file exists because I put it there. I get the error message: "Access to the specified device, path or file is denied"

        Here is the html source:
        Code:
        <LINK REL = "stylesheet" TYPE = "text/css" HREF = "header.css">
        When I try the ViewStyles bookmarklet, I get a dialog asking me whether I want to save the program or run it. I say to run it and I get an jscript error message: "document is undefined". What am I doing wrong?

        Comment


        • #5
          still having problems with this....

          For example, I go to www.robinzclark.com/header.css

          I know that this file exists because I put it there. I get the error message: "Access to the specified device, path or file is denied"

          Here is the html source:
          Code:
          <LINK REL = "stylesheet" TYPE = "text/css" HREF = "header.css">
          When I try the ViewStyles bookmarklet, I get a dialog asking me whether I want to save the program or run it. I say to run it and I get an jscript error message: "document is undefined". What am I doing wrong?

          Comment


          • #6
            You should use it on the html document that uses the external stylesheet, not on the stylesheet document itself.
            liorean <[[email protected]]>
            Articles: RegEx evolt wsabstract , Named Arguments
            Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
            Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

            Comment


            • #7
              bookmarklet question....

              I am on the html document itself. For example, I am on http://www.freeipb.net/ibe/

              I click on the Links>> in my Address bar, I choose, View Styles from the dropdown menu. Then when asked I say that I want to run the program from its location. I still get the jscript error message.

              Sorry for being so dense.....

              Comment


              • #8
                Oh, wait, you probably dragged the bookmarklet source file link to your links bar instead of the actual bookmarklet. Try the link right below the title instead. You could always try it out on that page first. It should open a popup to which it writes a list of stylesheets, not open a dialogue asking whether you want to run it or save it.
                liorean <[[email protected]]>
                Articles: RegEx evolt wsabstract , Named Arguments
                Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
                Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

                Comment


                • #9
                  Great!

                  Yes, you are right -- this is the error that I made. I have it working now and it is perfect. Just what I was looking for! This is a wonderful learning tool. Thank you so much!

                  Comment


                  • #10
                    If you happen to be using Mozilla Firefox (or if you're not, this would be a reason to switch!), you should check out the Edit CSS extenstion. It's very cool as it not only allows you to view the css of page by merely right clicking and selecting edit css, but it also allows you to edit the css of the page and see the results instantly. There are a few hangups with the editing part, but for the most part this extension works great.
                    My Site {Mike's Adventures}

                    Yikes, forums are almost too much fun.

                    Comment


                    • #11
                      Originally posted by pardicity3
                      If you happen to be using Mozilla Firefox (or if you're not, this would be a reason to switch!), you should check out the Edit CSS extenstion. It's very cool as it not only allows you to view the css of page by merely right clicking and selecting edit css, but it also allows you to edit the css of the page and see the results instantly. There are a few hangups with the editing part, but for the most part this extension works great.
                      I was thinking of linking to that, too. Great extension.
                      David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
                      W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

                      Comment


                      • #12
                        Re: still having problems with this....

                        Originally posted by Robin Clark
                        For example, I go to www.robinzclark.com/header.css

                        I know that this file exists because I put it there. I get the error message: "Access to the specified device, path or file is denied"

                        Here is the html source:
                        Code:
                        <LINK REL = "stylesheet" TYPE = "text/css" HREF = "header.css">
                        When I try the ViewStyles bookmarklet, I get a dialog asking me whether I want to save the program or run it. I say to run it and I get an jscript error message: "document is undefined". What am I doing wrong?
                        Worked just fine. You may want to get a real browser, though...
                        Oh, and since I've seen the CSS file.... do NOT use px for font size!!!
                        Vladdy | KL
                        "Working web site is not the one that looks the same on common graphical browsers running on desktop computers, but the one that adequately delivers information regardless of device accessing it"

                        Comment


                        • #13
                          Re: Re: still having problems with this....

                          Originally posted by Vladdy
                          do NOT use px for font size!!!
                          Because impaired users running IE won't be able to make the text bigger if it's illegible to them.

                          (People are shouting at us for those sort of posts, Vladdy )
                          David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
                          W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

                          Comment


                          • #14
                            Originally posted by me'
                            Because impaired users running IE won't be able to make the text bigger if it's illegible to them.
                            That's what they get for using that piece of junk from hell.
                            Last edited by fredmv; Feb 22, 2004, 03:00 PM.
                            Moderator @ WebDeveloper.com
                            Mentor @ WebXpertz.net

                            Comment


                            • #15
                              which is the most recommended way to size your fonts then? and what is the equivalent of 9, 10, 11, 12 px etc?
                              Dave

                              Comment

                              Working...
                              X