Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bckgrnd Image not working in FireFox 1

Status
Not open for further replies.

Jiggerman

Programmer
Sep 5, 2002
62
GB
Hello kinda and gentle people of the incredible editable internet,

A quick question, have I spotted a bug in Firefox, or is there a really silly reason why the css code below display's fine in IE but not (my trusty and beloved) FireFox?

Code:
#content h3{

	color:#FFFFFF;
	background-color: #CCCC00;
	background-attachment: fixed;
	background-image: url(../Images/Bands/Band-Gold.jpg);
	background-repeat: repeat-x;
	background-position: top;

}

Thanks for any and all help

 
background-position should have two parameters

background-position: x y;

possibly that or you have an error further up the styles that IE is glossing over.



Chris.

Indifference will be the downfall of mankind, but who cares?
Woo Hoo! the cobblers kids get new shoes.
Nightclub counting systems

So long, and thanks for all the fish.
 
Can you post a link to the page where this is happening?

Though it's doubtful, especially since you are using an <h3> element, it could be that it is to do with the way Firefox collapses boxes that contain floated elements whereas IE doesn't.
It might be that you just can't see the background in FF as the box has no depth.



Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
Try removing the fixed property. I can't really imagine why you need it and fixed will fix it in the top left corner of the screen (not element).
 
Thanks for all the advice folks,

It was the Fixed property that was causing the problem.

It must have been putting the background at the top corner of the screen, I still don't know why this wrked for other elements but not this one.

Thanks again guy's for saving my sorry ass!

cheers
Jigedy Jig

 

FYI, from the CSS specs, WRT the fixed property:

W3C said:
If a background image is specified, this property specifies whether it is fixed with regard to the viewport ('fixed') or scrolls along with the containing block ('scroll').

By viewport, they mean "the browser window".

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top