By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,628 Members | 1,401 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,628 IT Pros & Developers. It's quick & easy.

Reading a CSS file from an existing website?

P: n/a
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?

Thanks.

--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #1
Share this Question
Share on Google+
20 Replies


P: n/a
Els
Mike Barnard wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


You're saying you don't know that the path to the CSS file
is mentioned in the HTML file?
<link rel=stylesheet .....
or @import url( .... .css) will show you where it's at.

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

P: n/a
Quoth the raven named Els:
Mike Barnard wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the
HTML, but any external .css files don't show up. Is there a way
to see them and see what someone has done to get an effect?


You're saying you don't know that the path to the CSS file is
mentioned in the HTML file? <link rel=stylesheet ..... or @import
url( .... .css) will show you where it's at.


Possibly Mike means that, maybe, he's using IE and it downloads the
css file rather than displaying it. Such as this one from my
play-around spaces:
http://home.rochester.rr.com/bshagnasty/style/shag.css

The css will be in your browser cache. An alternative would be to use
oh, say, a modern browser such as Mozilla or Firefox which will
display the file directly in the browser.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #3

P: n/a
In article Mike Barnard wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


Depends on browser. AFAIK 3 methods that work in Opera somehow. I don't
know if there is any way to open all realted CSS files whiout opening
some of them manually.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin tyt
Jul 20 '05 #4

P: n/a
On Mon, 03 May 2004 21:27:50 +0200, Els <el*********@tiscali.nl>
wrote:
Mike Barnard wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?
You're saying you don't know that the path to the CSS file
is mentioned in the HTML file?
<link rel=stylesheet .....


I know it's there, but I can't just 'look' at the server (can I?) to
download the file. Or any scripts that may be there.
or @import url( .... .css) will show you where it's at.


New to me but I'll look it up, thanks.

BTW, your "You're saying you don't know...?" comment is VERY
condesending. No, we DONT all know things. I'm trying to teach
myself as best as I can.

--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #5

P: n/a
Mike Barnard wrote:
When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


Which browser are you using? There are add-on components for Mozilla
that let you view the css with fairly little effort.

http://webdeveloper.mozdev.org/

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #6

P: n/a
Els
Mike Barnard wrote:
On Mon, 03 May 2004 21:27:50 +0200, Els <el*********@tiscali.nl>
wrote:
Mike Barnard wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?
You're saying you don't know that the path to the CSS file
is mentioned in the HTML file?
<link rel=stylesheet .....


I know it's there, but I can't just 'look' at the server (can I?) to
download the file. Or any scripts that may be there.


No need to. If you find for instance <LINK rel="stylesheet"
type="text/css" href="/default.css">, you take the url from
the page, like http://www.somesite.com/ and paste
default.css after that.
Result: http://www.somesite.com/default.css.
In any browser but IE, this will result in the CSS file
being shown in the browser window. In IE, it usually opens
Notepad or your default text editor, and displays it in there.
or @import url( .... .css) will show you where it's at.


New to me but I'll look it up, thanks.


Welcome.
BTW, your "You're saying you don't know...?" comment is VERY
condesending. No, we DONT all know things. I'm trying to teach
myself as best as I can.


I'm sorry about that, by no means I wanted to sound
condesending. I was just surprised, and therefore not sure
if that was what you meant. When I was in the stage where I
didn't know how to find the stylesheet, I didn't even know
of the existence, which was why I was surprised. Anyway,
sorry, didn't mean to be condesending at all.

As for teaching yourself, I think you've got at least one
thing figured out that I didn't when I started: reading and
asking on usenet is very helpful :-)

--
Els
http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #7

P: n/a
On Mon, 03 May 2004 19:58:11 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
Quoth the raven named Els: Possibly Mike means that, maybe, he's using IE and it downloads the
css file rather than displaying it. Such as this one from my
play-around spaces:
I mean that if I look at any website online, the css sheet is
downloaded but not immedieatly available the way the html file is.
Yes, I've fallen into the trap of using IE 'because it's there'. I
must try these others.
The css will be in your browser cache. An alternative would be to use
oh, say, a modern browser such as Mozilla or Firefox which will
display the file directly in the browser.


I know it must be in the cache, but it's one of those places I don't
usually bother visiting. But thinking about it, it must be a
treasurehouse of data.

Thanks.
--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #8

P: n/a
On Mon, 3 May 2004 23:21:52 +0300, Lauri Raittila
<la***@raittila.cjb.net> wrote:
Depends on browser. AFAIK 3 methods that work in Opera somehow. I don't
know if there is any way to open all realted CSS files whiout opening
some of them manually.


Will explore other browsers, thanks.
--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #9

P: n/a
Quoth the raven named Mike Barnard:
On Mon, 03 May 2004 19:58:11 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:
Possibly Mike means that, maybe, he's using IE and it downloads
the css file rather than displaying it. Such as this one from my
play-around spaces:


I mean that if I look at any website online, the css sheet is
downloaded but not immedieatly available the way the html file is.
Yes, I've fallen into the trap of using IE 'because it's there'. I
must try these others.


Without a tool such as Brian mentioned, or typing in the URL to the
style sheet directly, there isn't an easier way to view. Depending on
other factors, the Notepad trick in IE may work (it doesn't in my
setup). But that's ok, as I don't use IE for anything but Winders updates.
The css will be in your browser cache. An alternative would be to
use oh, say, a modern browser such as Mozilla or Firefox which
will display the file directly in the browser.


I know it must be in the cache, but it's one of those places I
don't usually bother visiting. But thinking about it, it must be a
treasurehouse of data.


Treasurehouse? <g> First I've heard that one.

Not far from my house:
http://www.mikebarnard.com/

--
-bts
-This space intentionally left blank.
Jul 20 '05 #10

P: n/a
On Mon, 03 May 2004 21:21:01 GMT, "Beauregard T. Shagnasty"
<a.*********@example.invalid> wrote:

Thanks again.
Not far from my house:
http://www.mikebarnard.com/


If only! I'm in wet, windy Worthing, on the south coast of the UK.

http://www.thisisworthing.co.uk/worthing/weather/
--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #11

P: n/a
On Mon, 03 May 2004 22:49:36 +0200, Els <el*********@tiscali.nl>
wrote:
I know it's there, but I can't just 'look' at the server (can I?) to
download the file. Or any scripts that may be there.
No need to. If you find for instance <LINK rel="stylesheet"
type="text/css" href="/default.css">, you take the url from
the page, like http://www.somesite.com/ and paste
default.css after that.
Result: http://www.somesite.com/default.css.
In any browser but IE, this will result in the CSS file
being shown in the browser window. In IE, it usually opens
Notepad or your default text editor, and displays it in there.


New tricks every day. :)
or @import url( .... .css) will show you where it's at.


New to me but I'll look it up, thanks.


Welcome.
BTW, your "You're saying you don't know...?" comment is VERY
condesending. No, we DONT all know things. I'm trying to teach
myself as best as I can.


I'm sorry about that, by no means I wanted to sound
condesending. I was just surprised, and therefore not sure


And my reply was a bit of a snap too, sorry.
As for teaching yourself, I think you've got at least one
thing figured out that I didn't when I started: reading and
asking on usenet is very helpful :-)


It's all there; somewhere.

--
Regards from Mike Barnard
South Coast, UK.

[To reply by email remove ".trousers" spamtrap from email address]
Jul 20 '05 #12

P: n/a
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
comp.infosystems.www.authoring.stylesheets:
An alternative would be to use
oh, say, a modern browser such as Mozilla or Firefox which will
display the file directly in the browser.


I use Mozilla, but the only way I've been able to get it to display
the CSS "right in the browser" is to View Source of the HTML, then
put the URL of the CSS in the location window.

DOM inspector can show the computed CSS, but it sounds like you have
an easy way to view the original style sheet. Please share!

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #13

P: n/a
Quoth the raven named Stan Brown:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
comp.infosystems.www.authoring.stylesheets:
An alternative would be to use oh, say, a modern browser such as
Mozilla or Firefox which will display the file directly in the
browser.
I use Mozilla, but the only way I've been able to get it to display
the CSS "right in the browser" is to View Source of the HTML, then
put the URL of the CSS in the location window.


This is what I meant. Enter the URL.
DOM inspector can show the computed CSS, but it sounds like you
have an easy way to view the original style sheet. Please share!


Actually, I considered the above fairly easy. <g> But the
webdeveloper's toolbar will do what you want with a couple clicks.
http://webdeveloper.mozdev.org/

--
-bts
-This space intentionally left blank.
Jul 20 '05 #14

P: n/a
Stan Brown wrote:
DOM inspector can show the computed CSS, but it sounds like you have
an easy way to view the original style sheet. Please share!


http://webdeveloper.mozdev.org/

Provide a "view css" under "information" menu.

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #15

P: n/a
On Mon, 03 May 2004 20:09:08 +0100, Mike Barnard <m.****************@thunderin.co.uk>
wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?

Thanks.


With MSIE 6 do a File, Save As: "Web Page, complete"
The .css file and graphics are stored in an automatically created,
well-named sub-directory.

(I find EditPlus very convenient to view the page, html, and css,
and even the graphics.)

Mason C

Jul 20 '05 #16

P: n/a
Stan Brown wrote:
"Beauregard T. Shagnasty" <a.*********@example.invalid> wrote in
comp.infosystems.www.authoring.stylesheets:
An alternative would be to use
oh, say, a modern browser such as Mozilla or Firefox which will
display the file directly in the browser.

I use Mozilla, but the only way I've been able to get it to display
the CSS "right in the browser" is to View Source of the HTML, then
put the URL of the CSS in the location window.

DOM inspector can show the computed CSS, but it sounds like you have
an easy way to view the original style sheet. Please share!


Firefox has an extension called EditCSS that allows on-the-fly changes
to any given site's CSS, local on your own browser obviously. One side
effect of this extension is that if you use it on one site and then
visit another site, it applies the CSS to the new site, sometimes with
very pleasing results.

I imagine the extension will work with Mozilla as well.

http://texturizer.net/firefox/extensions/#editcss

'Later
Peter

--
Peter aka Ulujain - Computing for Fun!
http://www.ulujain.org/
Jul 20 '05 #17

P: n/a
On Mon, 03 May 2004 20:09:08 +0100, Mike Barnard
<m.****************@thunderin.co.uk> wrote:
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?

Thanks.

What I do is this. Once I see the HTML, I scope out the locations of any
css files, I enter that address into the browser window, and one of two
things happens:

In IE6, the file opens in Notepad, though it often comes out screwy.

In Opera, it is displayed in the browser viewport.

The IE accessibility toolbar allows viewing of some CSS files.
http://www.nils.org.au/ais/web/resources/toolbar/
Jul 20 '05 #18

P: n/a
Mike Barnard wrote in
<r4********************************@4ax.com>
Hi.

When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


You might read the information that I gave you in another ng. Then you might
read this:
http://www.uwasa.fi/~ts/http/crospost.html

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

Jul 20 '05 #19

P: n/a
Ivo
"Mike Barnard" wrote
When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


In addition to the many ideas already posted, here is a "View Sources"
bookmarklet. It will display the HTML source plus linked styles and scripts,
each in its own Notepad window (Win/IE) or browser window (Mozilla).
Stylesheets that are called with "import" are not included.

javascript:
var r=new Image(),s=document.getElementsByTagName("script");
for(var n=0;n<s.length;n++)
if(r.src=s[n].src)
open("view-source:"+r.src);
s=document.styleSheets;
for(var n=0;n<s.length;n++)
if(r.src=s[n].href)
open("view-source:"+r.src);
open("view-source:"+location.href);
void('yeah');

or on one line:
javascript:var r=new
Image(),s=document.getElementsByTagName("script"); for(var
n=0;n<s.length;n++)if((r.src=s[n].src))open("view-source:"+r.src);s=document
..styleSheets;for(var
n=0;n<s.length;n++)if(r.src=s[n].href)open("view-source:"+r.src);open("view-
source:"+location.href);void('o yeah');

HTH
Ivo
Jul 20 '05 #20

P: n/a
Mike Barnard <m.****************@thunderin.co.uk> writes:
When looking at a website I can use VIEW / SOURCE to see the HTML, but
any external .css files don't show up. Is there a way to see them and
see what someone has done to get an effect?


Run the site through a validator such as

http://jigsaw.w3.org/css-validator/validator-uri.html

--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pe*********@westerngeco.com -./\.- opinion of Schlumberger, Baker
http://petef.port5.com -./\.- Hughes or their divisions.
Jul 20 '05 #21

This discussion thread is closed

Replies have been disabled for this discussion.