Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Should There Be Two Different Css Files, one for stly and one for lay out?
Static_Fury
post Sep 29 2005, 12:28 PM
Post #1


Advanced Member
*******

Group: Members
Posts: 112
Joined: 24-July 05
Member No.: 9,818



well you guys are always so good to me, and well its been a while since i have come back for help, but i need it again since starting to learn (X)HTML ,at a slow pace, in august, i decided its time to make my first REAL website with fun stuff fake adds affilates and the such. ok ok, my questions is about CSS, is it more proper to make two css files one for layout and one for formatting? or should it all be one file?
Go to the top of the page
 
+Quote Post
round
post Sep 29 2005, 12:35 PM
Post #2


Super Member
*********

Group: Members
Posts: 463
Joined: 8-November 04
Member No.: 2,186



keep it all in one file, that way you can have a differnt css file for completely different sections of your site, if that's an appeal. But i like to have to open and save only one file to the server when making changes to my site.round
Go to the top of the page
 
+Quote Post
Saint_Michael
post Sep 29 2005, 02:14 PM
Post #3


$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************

Group: [HOSTED]
Posts: 6,443
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew



well i seen alot of website templates that use 2-3 css scripts, i think if you want to skin a website without the means of using php then try it out, for me it seems to be a little easier to control everything, if i want to mess with colors go to one page or text i go ot the other page. but its a matter of preferance on how you want to do it.
Go to the top of the page
 
+Quote Post
flyerdball
post Sep 29 2005, 02:45 PM
Post #4


Newbie [Level 2]
**

Group: Members
Posts: 38
Joined: 26-September 05
Member No.: 12,276



QUOTE(round @ Sep 29 2005, 08:35 AM)
keep it all in one file, that way you can have a differnt css file for completely different sections of your site, if that's an appeal. But i like to have to open and save only one file to the server when making changes to my site.round
*



I have seen many websites do external stylesheets for the entire website, with internal stylesheets for the individual pages. I believe that Slashdot in fact does that now.
Go to the top of the page
 
+Quote Post
SystemWisdom
post Sep 29 2005, 03:47 PM
Post #5


Advanced Member
*******

Group: Members
Posts: 117
Joined: 3-May 05
From: A Canadian South of the 49th Parallel
Member No.: 6,544



I usually use 2 or more CSS files, one for common stuff, one for layout, etc.. but I find this a bit cumbersome, not to mention that having it all in one file makes for easier validation, by providing a single link to validate the single CSS file.. Not that validation matters much to the end-user in most cases..

Ultmately, I think it is personal preference really..
Go to the top of the page
 
+Quote Post
Static_Fury
post Sep 30 2005, 12:41 AM
Post #6


Advanced Member
*******

Group: Members
Posts: 112
Joined: 24-July 05
Member No.: 9,818



Thank you guys i love you wink.gif...im going to go with 2 just so not to comfuse myself too much...
Go to the top of the page
 
+Quote Post
Tyssen
post Sep 30 2005, 12:52 AM
Post #7



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(SystemWisdom @ Sep 30 2005, 01:47 AM)
but I find this a bit cumbersome, not to mention that having it all in one file makes for easier validation, by providing a single link to validate the single CSS file..  Not that validation matters much to the end-user in most cases.

The jigsaw validator will run through your CSS whether it's in one file or more. The way I link to more than one CSS file is like this:

CODE
<style type="text/css" media="screen">@import "your.css";</style>

and then in your.css, you have this:

CODE
@import url("structure.css");
@import url("text.css");

Go to the top of the page
 
+Quote Post
Saint_Michael
post Sep 30 2005, 12:58 AM
Post #8


$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3
*********************

Group: [HOSTED]
Posts: 6,443
Joined: 21-September 04
From: 9r33|\| 399$ 4|\|D 5P4/\/\
Member No.: 1,218
T17 GFX Crew



yeah thats how i seen it done it amazing what you can find by accident on the net i didn't even know it was possible until a couple of months ago.

but on validation aspects yeah i believe WC3 does the multiple css sheet i had a few errors on both sheets which i fix and was validated.
Go to the top of the page
 
+Quote Post
Lozbo
post Oct 1 2005, 01:19 AM
Post #9


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



I found sites that use tons of diffeent sheets, that way they can customize different things on different files.

Usually i like betterworking with only a file, which will have all styles i use for my site.

But when it comes to something like moodle, when you have to do your own skin, i think its easier to have different style sheets, like one named "color", other named "layout" etc etc...

What you can have for different skins is have one file per skin, named for example "name-of-the-skin.css" and within it you have the @import rules to import all styles needed (like layout.css, text.css, colors.css etc..)

I actually have not done this, but i know its a way to do so. Usually i only leave one style sheet per page, with only one skin, have not time to do more (i do but im lazy tongue.gif ) hehe

-10730