By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,616 Members | 1,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,616 IT Pros & Developers. It's quick & easy.

fixed background image w/css problem

P: n/a
I'm trying to create a fixed, no-repeat, centered background image using
an external css. Everything works great until I add

background-attachment: fixed

then it just doesn't show the image at all. I've tried it using the
"all in one"

{background: url(SGsmall.jpg) no-repeat center fixed}

and it just doesn't show the background image.

as soon as I remove the fixed part it works fine, but of course it is
not fixed. I've tried it in NS7 and IE6.

What gives?

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Mon, 27 Sep 2004 20:29:56 -0400, Jonathan Carmichael
<jo****************@cox.net> declared in
comp.infosystems.www.authoring.html:
What gives?


As usual, a URL speaks a thousand words.

--
Mark Parnell
http://www.clarkecomputers.com.au
Jul 23 '05 #2

P: n/a
On Mon, 27 Sep 2004 20:29:56 -0400, Jonathan Carmichael
<jo****************@cox.net> wrote:
I'm trying to create a fixed, no-repeat, centered background image using
an external css. Everything works great until I add

background-attachment: fixed

then it just doesn't show the image at all. I've tried it using the
"all in one"

{background: url(SGsmall.jpg) no-repeat center fixed}

and it just doesn't show the background image.

as soon as I remove the fixed part it works fine, but of course it is
not fixed. I've tried it in NS7 and IE6.

What gives?


Are you aware that 'fixed' fixes the background relative to the
viewport an dnot relative to the element you've set the style on? Thus
your background image will be fixed at the top center of the viewport
and will not tile. If you have other elements at the top of your page
with backgounds then they are likely to be covering the background
image.

Post a URL.

Steve

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.