Questions tagged [background-attachment]

CSS property for setting a background-image's position.

CSS background-attachment property sets whether a background-image's position is fixed within the viewport, or scrolls with its containing block.
background-attachment MDN Reference

106 questions
0
votes
1 answer

Fixed background with top navbar and scrolling

I'm creating a website for a fake company for my sister's birthday, and I'm having a little bit of trouble with the fixed background. I know it's supposed to be simple and just a matter of attachment:fixed, but it doesn't seem to work for some…
0
votes
1 answer

CSS - Fixed Background Attachment making white strip appears at some scroll positions

I have a header which has a background which is set to background-attachment: fixed;, but this is making a white strip appear at the top of the page at certain scroll positions (The background is blurred, so the strip is also blurred, but it is…
M. Salman Khan
  • 608
  • 1
  • 6
  • 16
0
votes
2 answers

CSS - background-attachment:fixed not stopping scroll (tumblr theme)

I'm doing some coding for a tumblr theme and running into this problem: "background attachment: fixed" doesn't stop the background image from scrolling up and down; it still moves with the content. HTML
Thomas Wood
  • 313
  • 4
  • 13
0
votes
3 answers

Background attachment fixed to the wrapper div

I have a such a situation: http://jsfiddle.net/5axmtw9g/3/
Naira2596823
  • 151
  • 2
  • 14
0
votes
1 answer

Scaling background images without background-attachment: fixed?

I'm trying to figure out the best method for making a background image fully responsive - so far the best way I can figure out is to use background-size: cover, as most people tend to suggest, but with background-attachment: fixed so that the image…
0
votes
0 answers

Fallback for background-attachment: fixed

On a production site I have a background-attachment: fixed image applied to the body, and I'm using a gradient fallback for browsers that don't support this style rule, and a solid background fallback if that same browser doesn't support gradients. …
mumush
  • 650
  • 6
  • 14
0
votes
2 answers

How do these background images stay fixed like this?

I wasn't quite sure what to call this question so hopefully that title is correct. I'm going to be working on this website for a new client and they said that they wanted something similar to what this website is doing…
Ajax jQuery
  • 357
  • 1
  • 5
  • 19
0
votes
1 answer

Align fixed background with CSS calc

I hope what I try is not impossible. Let me explain first: I have a responsive design which requires a background to be fixed under some situations (media query blocks). The design in question is this…
0
votes
0 answers

background-attachment is not really fixed with css3 translate animation

How can I use fixed background-attachment with css3 translate animation instead of changing "left" attribute animation? I want to use fixed background-attachment…
0
votes
1 answer

Fixed background not working in Chrome

I have background-attachment: fixed; on my hero section and it works in firefox and safari but not in chrome. I can get it to work by changing to position:relative; and z-index: -1; but then the buttons within the hero become unusable and this also…
0
votes
1 answer

A fixed background image, with text (and also responsive)

I've been trying to figure something out, but no luck. I have also been searching the internet for possible solutions but again, no luck. Let's say I wanted an image with text to stay fixed in the background while the user scrolls down while viewing…
0
votes
1 answer

CSS fixed background-attachment blinks in google chrome

There is a Google chrome bug with my code that there isn't in IE & Firefox. The Address is : chashnik The DIV class '.health' has a background image with fixed attachment property. In Google chrome this images blinks repeatedly and never…
0
votes
1 answer

Change CSS properties via JavaScript

I need to modify some CSS properties via JavaScript. The website I need to work with is based on a CMS and I can only edit body elements to inject code. I was wondering if there was a way to use JavaScript to modify/override the CSS on-the-fly as…
-1
votes
0 answers

background image with fixed attachment not working on iOS devices

i have made a website with fixed background on the home page . it works perfectly in computer screens and android devices but the image became extra zoom and blurry in ios devices and safari browser i have tried using…
-1
votes
1 answer

How do I stop background-image from zooming in because of background-size: cover?

I'm creating a website, using chrome to debug. I am creating a scrolling page with full height images as background images for my divisions, using "background-size: cover;" and "background-attachment: fixed;". On chrome's (mobile) debug viewer on my…
Fred Jack
  • 27
  • 1
  • 3