Click here to get back home

fixed background image w/css problem

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
fixed background image w/css problem Jonathan Carmichael 09-27-2004
Posted by Jonathan Carmichael on September 27, 2004, 9:29 pm
Please log in for more thread options
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?



Posted by Steve Pugh on September 28, 2004, 8:34 am
Please log in for more thread options
On Mon, 27 Sep 2004 20:29:56 -0400, Jonathan Carmichael

>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



Posted by Mark Parnell on September 28, 2004, 11:50 am
Please log in for more thread options
On Mon, 27 Sep 2004 20:29:56 -0400, Jonathan Carmichael
comp.infosystems.www.authoring.html:

> What gives?

As usual, a URL speaks a thousand words.

--
Mark Parnell
http://www.clarkecomputers.com.au


Similar ThreadsPosted
2 layers fixed background ? July 17, 2004, 5:20 pm
fixed image size February 12, 2007, 1:53 pm
with background image - what's the right way? March 4, 2005, 5:51 pm
CSS Bug?? background-image - Not Refreshing October 25, 2005, 10:39 am
Background image not appearing December 29, 2005, 11:42 pm
HTML Background image January 28, 2006, 4:51 pm
Mac IE not displaying background-image June 20, 2006, 6:39 am
Help! Background image not displaying... February 8, 2008, 6:11 pm
Firefox does not recognize background image May 3, 2006, 9:20 pm
Masking large image into background February 26, 2007, 4:40 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap