CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   css inheritance (http://www.codingforums.com/showthread.php?t=281552)

guysoul 11-08-2012 12:44 PM

css inheritance
 
Hi experts,

I have three css files (main.css, style81.css and style86.css) .

On main.css. i have this script
Code:

body { background-image: url(/gfx/style/81/css-files/background_new_02.gif); background-color: #ffffff; padding: 0px; margin: 0px;

On style81.css and style82.css, i have this script
Code:

@import url(main.css);

The thing here, i want to use different background images on each stylesheets..

is that possible? if yes, whats the best way to do it?

Thank you :)

Regards,

Ed

Excavator 11-08-2012 03:58 PM

Hello guysoul,
You could do that with an id or class on the body of each document. Like this:
html - <body id="style1">
css - body#style1 {}

VIPStephan 11-08-2012 11:28 PM

Excavator, I think you have misunderstood guysoul. As far as I understand they just need to override the style in the other stylesheets, like:
Code:

@import url(main.css);

body {background-image: [different image path];



All times are GMT +1. The time now is 05:56 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.