Uridium Posted November 22, 2010 Share Posted November 22, 2010 this is for those who have many styles of style sheets in their game... Themes are always nice to have but if the CSS was large in style.css and you wanted to make more then usually youd need to add more CSS files with nearly the same data as style.css so heres a way to cheat.. always have style.css as your main stylesheet.. and to add more simple do this create a new css and add @import "style.css" ; body { background: #d6d8cb url(images/Halloween3.jpg) repeat top center fixed; } A:link {text-decoration: none; color: #000000; font-size: 28;} A:visited {text-decoration: none; color: #000000; font-size: 28;} A:active {text-decoration: none; color: #000000; font-size: 28;} A:hover {text-decoration: underline; color: #bdebde; font-size: 28;} The @import will auto select style.css as its main source but you can now add new elements to the newly created css whilst still keepig data from the style.css Quote Link to comment Share on other sites More sharing options...
Jordan Palmer Posted November 22, 2010 Share Posted November 22, 2010 Moved to web design, It's general css tips ;) Quote Link to comment Share on other sites More sharing options...
Djkanna Posted November 22, 2010 Share Posted November 22, 2010 Just some tips * will effect all elements. [css] * { color: #000; } [/css] _ /9 * Will effect IE only [css] .blah { color: #000; /*All*/ color: #FFF\9; /*IE8 < */ *color: #999; /* IE7 < */ _color: #CCC; /* IE6 */ [/css] Conditional statements is probably better but hey at least you know. http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-how-to-target-ie6-ie7-and-ie8-uniquely-with-4-characters/ - IE Selectors http://net.tutsplus.com/tutorials/html-css-techniques/the-30-css-selectors-you-must-memorize/ - 30 CSS selectors you must memorize. Quote Link to comment Share on other sites More sharing options...
Nickson Posted November 22, 2010 Share Posted November 22, 2010 This isn't much of "cheating", it's just using a different method to link more as one css stylesheet. As second remark, you're doing it wrong :o always have style.css as your main stylesheet.. you need to link your newly created css stylesheet, because else, you'll always end up with only the css of the style.css file. The css import will import the css of the file into the other css section. Saying that the import will take the specified file as main source isn't right either, it just imports the css of that file into the requesting file. as 3rd note, the last 4 lines could be done in less letters, which results in again smaller files. A {text-decoration: none; color: #000; font-size: 28;} A:hover {text-decoration: underline; color: #bdebde;} I'm not saying you have to do it like that, but that will result in a shorter file again, and that seems to be your main concern with this topic. Oh v4 browsers will not care about the import and just ingore it, but that doesn't matter anymore since we're long pas that era. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.