CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 22nd, 2003, 07:51 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 21 m 43 sec
Reputation Power: 437
CSS -- Internal vs External -- Speedwise

Is there any difference in speed for an internal style sheet vs an external one?

I've putting all the styles withing each page dynamicly from one source, because of themes and the want to change some styles from one place only it has to be done. Is there is a better way then internal style?

With external there is the plus of having it cached, and I could have the style.css be parsed by php instead, would this be better?
__________________
Miscellaneous Software
Viper_SB
Developershed E-Support


Anyone else play chess?
Challenge me

Reply With Quote
  #2  
Old October 22nd, 2003, 07:58 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
absolutely no difference whatsoever - providing the external CSS file is on your machine.

if you use external CSS then it is loaded and then the page is formatted. If you use internal the CSS is loaded with the page. Either way you have the same amount of CSS code. Loading the external file in may add a millisecond or two. A big point of CSS is that it should really be used with external sheets, otherwise its kind of defeated, fair enough you would have more control with CSS than font tags but you would still have to go into every page and change them if internal.

Reply With Quote
  #3  
Old October 22nd, 2003, 08:06 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 21 m 43 sec
Reputation Power: 437
ya but each page is dynamic php all going to be read mostlikly from a db so everything will be changed from one place (but is just weird ) anways thanks for the input.

Reply With Quote
  #4  
Old October 22nd, 2003, 08:08 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
im not getting what you are doing? why are you putting CSS definitions in a database? Just use external CSS files and then call then with LINK REL=stylefile.css .......

Reply With Quote
  #5  
Old October 22nd, 2003, 08:10 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
apologies if I have totally the wrong end of the stick

Reply With Quote
  #6  
Old October 22nd, 2003, 08:12 PM
cliffhanger9's Avatar
cliffhanger9 cliffhanger9 is offline
fortin bra?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: city of sin, state of the art
Posts: 416 cliffhanger9 Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 18 h 22 m 19 sec
Reputation Power: 0
Send a message via ICQ to cliffhanger9 Send a message via AIM to cliffhanger9 Send a message via MSN to cliffhanger9 Send a message via Yahoo to cliffhanger9
Quote:
Originally posted by ralphuk100
absolutely no difference whatsoever - providing the external CSS file is on your machine.

if you use external CSS then it is loaded and then the page is formatted. If you use internal the CSS is loaded with the page. Either way you have the same amount of CSS code. Loading the external file in may add a millisecond or two. A big point of CSS is that it should really be used with external sheets, otherwise its kind of defeated, fair enough you would have more control with CSS than font tags but you would still have to go into every page and change them if internal.


Agreed.

some ppl say that the externals would be faster because the are only loaded once and then they are there. but even if they werent i would stillll stick with the externals...it makes it soooo much more flexible and easier and faster (in the design time sense) and it just makes for a good time.

haha serisously...the time difference isnt calculable and the advantages of externall exceed internal by sooooo much its only worth doin it once...use external.

ROCK ON!!

Reply With Quote
  #7  
Old October 22nd, 2003, 08:16 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 21 m 43 sec
Reputation Power: 437
well I would (and have on other sites) used external ones, let me try to explain what needs to be done.

There are themes, say 5 of them (there can be unlimited), within each theme is 3 stylesheets, large medium and small. To make a single change across multiple themes you'd need to edit 15 css files (say the a class(tag) which isn't affected by size) this is something the manager of the site doesn't want to have to do, he wants to edit the a tag in one spot and it affect all the themes.

Hope it's explained better if not just say so.

Reply With Quote
  #8  
Old October 22nd, 2003, 08:17 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 21 m 43 sec
Reputation Power: 437
read other post

Reply With Quote
  #9  
Old October 22nd, 2003, 08:23 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
are your pages dynamic? (php/asp?) you could just do:

$themeTypeSize = $_GET['themeTypeSize'];

<link href="<?=themeTypeSize?>.css" rel="stylesheet" type="text/css">

But putting CSS files into a database just is not a good idea from any way I look at it.

Reply With Quote
  #10  
Old October 22nd, 2003, 08:25 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
aah - I see what you mean. What you should be doing is having a generic.css and then a themefile.css - every page should load generic.css and then the themefile.css can be dynamic - either called through cookie (if the users theme is saved), or just through the querystring etc.

Reply With Quote
  #11  
Old October 22nd, 2003, 08:46 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,784 Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Viper_SB User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 4 Weeks 18 h 21 m 43 sec
Reputation Power: 437
how can you add the second css? I mean can you do.
<link href="generic.css" rel="stylesheet" type="text/css">
<link href="theme1.css" rel="stylesheet" type="text/css">
?

Reply With Quote
  #12  
Old October 22nd, 2003, 08:51 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
yes, you can include as many css files as you want. They are just like server side includes

Reply With Quote
  #13  
Old October 22nd, 2003, 08:53 PM
ralphuk100's Avatar
ralphuk100 ralphuk100 is offline
meester luva luva
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Posts: 2,649 ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level)ralphuk100 User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 20 h 52 m 29 sec
Number of bans: 1
Reputation Power: 19
Send a message via MSN to ralphuk100
you did not say if your pages were html? or a server side language such as asp/php?

if the latter I would recommend making the theme style file name a variable and then calling that file with something like:

<link href="<?=themeTypeSize?>.css" rel="stylesheet" type="text/css">

but its up to you - im off to be now so wont be replying for the next 10 hours or so sorry.

Reply With Quote
  #14  
Old October 22nd, 2003, 08:53 PM
cliffhanger9's Avatar
cliffhanger9 cliffhanger9 is offline
fortin bra?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003