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 08-10-2007, 09:58 AM   PM User | #1
frenchi6625
New to the CF scene

 
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
frenchi6625 is an unknown quantity at this point
CSS and rotating header

Hi all

I have the following that specifies the header image:

.header {
background: url(img/header.jpg) no-repeat;
height: 180px;
margin: 0 auto;
width: 630px;
}

Is it possible to have this code specify a different header image for each html page?

Thanks in advance!
frenchi6625 is offline   Reply With Quote
Old 08-10-2007, 11:20 AM   PM User | #2
Jutlander
Regular Coder

 
Jutlander's Avatar
 
Join Date: Jun 2007
Location: In my own sick little world :P
Posts: 425
Thanks: 1
Thanked 12 Times in 12 Posts
Jutlander is on a distinguished road
I believe the <style> tag will override an external stylesheet, so in between your <head> and </head> place this and change it on every page:

Code:
<style type="text/css">
.header { background: url(img/header2.jpg); }
</style>
__________________
.
.
Jutlander is offline   Reply With Quote
Old 08-10-2007, 11:51 AM   PM User | #3
frenchi6625
New to the CF scene

 
Join Date: Aug 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
frenchi6625 is an unknown quantity at this point
thanks mate, worked like a charm:


.header {
background: url(img/headers/state_1.jpg);
}
frenchi6625 is offline   Reply With Quote
Old 08-10-2007, 01:08 PM   PM User | #4
Bill Posters
Senior Coder

 
Join Date: Feb 2003
Posts: 1,665
Thanks: 0
Thanked 27 Times in 25 Posts
Bill Posters will become famous soon enough
Quote:
Originally Posted by Jutlander View Post
I believe the <style> tag will override an external stylesheet,
Not necessarily.

Presuming you mean embedded CSS. (External CSS can be @imported via style elements)...

It depends in which order you add the external stylesheet and embedded styles to the document.
If you add the external stylesheet after the embedded styles, then the external stylesheet will win over the embedded rules whenever property conflicts occur.
If the embedded CSS comes after the external stylesheet in the markup, then the embedded CSS will win over whenever property conflicts occur.
Bill Posters 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 06:22 AM.


Advertisement
Log in to turn off these ads.