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

Script: fixed background attachment

Some forums I use don't have fixed backgrounds and I find it dizzying. I was hoping to change that with the TamperMonkey plugin but it requires scripts and I don't know how to create scripts. I found one similar albeit older topic and the scripts…
Gear
  • 1
0
votes
1 answer

background-attachment: local; CSS style not working in Firefox

I am trying to show a line number for every line. My code working properly in Chrome but in Firefox it's not working because of background-attachment: local; not accepting in Firefox. I want it should work in both browsers. JsFiddle:…
santosh
  • 742
  • 8
  • 19
0
votes
1 answer

Trouble with 3 column layout with outside elements/columns having background-attachment: fixed

I'm really close to what I want, a 3 column layout where only the center content scrolls via the normal scrollbar. My problem is the outside images/cols have background-attachment: fixed, which works, but I am so far unable to position the…
xcr
  • 97
  • 1
  • 10
0
votes
0 answers

background-attachment : fixed > resizes my image after a short time

Sorry this noobish question has been asked a lot, but none of the solutions i've read and tested works for me... I'm trying to create that kind of parallax effect with a carousel background :…
Sumak
  • 319
  • 1
  • 3
  • 8
0
votes
1 answer

background-attachment: Fixed, moves position between Chrome versions

I've got a full width section of a site that is the same colour of the logo. So I have used background-attatchment: fixed to keep a second 'faux' (as in its just for the design) logo over the top of the regular logo that exists on the whole…
0
votes
0 answers

"background-attachment: fixed" somehow is working on mobile device

I know it's a topic that has been answered several times, but I'm playing with css "background-attachment:fixed" property, and I wanted to make it work on mobile devices. The answer is: it's not possible, because it is forced to "scroll" for…
0
votes
1 answer

background-attachment fixed and container width

I'm sorry if my question is stupid, but I can't understand what "a picture is fixed with regard to the viewport" means and how it's connected to the following thing: Suppose that we have a html element
and some…
E. Shcherbo
  • 1,128
  • 8
  • 15
0
votes
1 answer

Strange behaviour with Chrome + position:fixed + background-attachement:fixed

This problem has been reported several times on SO and elsewhere but i couldn't find any well working solution. If you have a fixed positioned div with a fixed-attached background, in some specific conditions the rendering is buggy on Google Chrome…
0
votes
2 answers

Why is my background repeating?

Im learning how to build a website, but I have some trouble because of the background. The background is repeating when I add content to the div container. Why is that, and how can I fix it? .body { background:…
0
votes
1 answer

Background Fixed on Mobile Devices

I wanted to do flowing content over fixed background. It works perfectly on desktop. On iOS also works but not perfect. Main problem is on android phones. It isn't covering content. If you want edit it, here is CodePen link. body{ …
Adil Heybetov
  • 13
  • 1
  • 7
0
votes
1 answer

CSS multiple fixed background psuedo elements

I am trying to create a parallax scrolling effect using only CSS and with no third party libraries. Using background-attachment: fixed I was able to achieve the effect I wanted on multiple full-width divs on my page. Using that, however, negatively…
topherlicious
  • 173
  • 3
  • 13
0
votes
1 answer

How do I get the container over my background picture in Twitter Bootstrap

I´m currently trying to make a website with twitter bootstrap. Unfortunately, I can not create a background image so that my container pushes about it. Always pushes the background over my background picture. Can someone tell me how to do this? here…
user3200569
0
votes
0 answers

CSS background-attachment: local with direction: rtl

I have a scrollable div and was trying to implement shadow on top of the div when scrolling the div. I found this simple implementation on codepen : https://codepen.io/bennyzhao/pen/iGoBm This example did work for me, but after I was playing…
Ron537
  • 990
  • 1
  • 9
  • 20
0
votes
2 answers

Background images and background attachment

I'm having trouble with adding backgrounds to different elements on the same page and could use some help. I'm trying to make a one page site with multiple sections and backgrounds (like http://ofarevolution.com/) using "background-attachment" but I…
user5937433
0
votes
0 answers

background-position not applying with background fixed

This is my CSS element.style { background-image: url("photo.jpeg"); background-attachment: fixed; background-size: cover; background-position: 50% 66%; } The position of the photo remains (0% 0%) as if background-position never…