View Full Version : css inheritance

11-08-2012, 01:44 PM
Hi experts,

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

On main.css. i have this script

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

@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 :)



11-08-2012, 04: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 {}

11-09-2012, 12:28 AM
Excavator, I think you have misunderstood guysoul. As far as I understand they just need to override the style in the other stylesheets, like:

@import url(main.css);

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