Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-08-2012, 12:44 PM   PM User | #1
guysoul
New to the CF scene

 
Join Date: Nov 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
guysoul is an unknown quantity at this point
Smile 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
guysoul is offline   Reply With Quote
Old 11-08-2012, 03:58 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
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 {}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 11-08-2012, 11:28 PM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,592
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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];
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:25 PM.


Advertisement
Log in to turn off these ads.