Quote (SikGod @ Jan 16 2016 01:33pm)
Thanks that will give me the same layout and etc for all my pages right? But if id like a different layout for one or more pages but all on the same .css file rather then having a new file for every different layout.
Code
body {
background-color: lightblue;
}
body (page 2) {
background-color: green;
}
body (page 3) {
background-color: red;
}
So I believe I need the code to reference a html file from the .css rather then the other way around? Maybe I am just organizing things poorly <_<
if you want it all in the same css file, you'll have to use classes
.body-pg2{
background-color: green;
}
then in your html file:
<body class='body-pg2'>
name it whatever makes sense for you.
/edit:
I'm not an expert in CSS. but with that said, i prefer having multiple css files because they're much easier to manage than a single file with thousands of lines. if your concern is performance, you can always use a script that combines them at build time.
i dont have much experience with them, but one of these days i'm going to look into options like sass or LESS to help make managing them easier
http://sass-lang.com/guidehttp://lesscss.org/This post was edited by carteblanche on Jan 16 2016 12:47pm