468,537 Members | 1,944 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

fixed background image w/css problem

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
2 4014
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
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.

Similar topics

1 post views Thread by Vitabiz Productions Ltd | last post: by
2 posts views Thread by hq105862 | last post: by
1 post views Thread by Robert Blasius | last post: by
1 post views Thread by Andrew Poulos | last post: by
40 posts views Thread by Mark | last post: by
7 posts views Thread by Paul Wake | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.