Jump to content
xisto Community
Sign in to follow this  
Static_Fury

Should There Be Two Different Css Files one for stly and one for lay out?

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

190351[/snapback]


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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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:

<style type="text/css" media="screen">@import "your.css";</style>
and then in your.css, you have this:

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 :huh: ) hehe-10730

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.