Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    Cincinnati, OH
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 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
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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"

  • #3
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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; 02-22-2004 at 04:21 PM.
    liorean <[lio@wg]>
    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

  • #4
    New Coder
    Join Date
    Feb 2004
    Location
    Cincinnati, OH
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #5
    New Coder
    Join Date
    Feb 2004
    Location
    Cincinnati, OH
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    You should use it on the html document that uses the external stylesheet, not on the stylesheet document itself.
    liorean <[lio@wg]>
    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

  • #7
    New Coder
    Join Date
    Feb 2004
    Location
    Cincinnati, OH
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

  • #8
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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 <[lio@wg]>
    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

  • #9
    New Coder
    Join Date
    Feb 2004
    Location
    Cincinnati, OH
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!

  • #10
    Regular Coder
    Join Date
    Jun 2002
    Location
    Iowa / Notre Dame
    Posts
    538
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #11
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!

  • #12
    Senior Coder
    Join Date
    Jun 2002
    Location
    Nashua, NH
    Posts
    1,724
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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"

  • #13
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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!

  • #14
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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; 02-22-2004 at 09:00 PM.

  • #15
    Regular Coder
    Join Date
    Jan 2004
    Location
    London, UK
    Posts
    234
    Thanks
    0
    Thanked 0 Times in 0 Posts
    which is the most recommended way to size your fonts then? and what is the equivalent of 9, 10, 11, 12 px etc?
    Dave


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •