Questions tagged [background-position]

CSS property that sets the initial position, relative to the background position layer defined by background-origin for each defined background image

CSS property that sets the initial position, relative to the background position layer defined by background-origin for each defined background image.

Examples

.exampleone {
  background-image: url("logo.png");
  background-position: top;
}

.exampletwo {
  background-image: url("logo.png");
  background-position: 25% 75%;
}

References

  1. background-position - W3C Specification
  2. background-position - MDN Link
381 questions
-1
votes
3 answers

align css background to the right

I want to change div background to the right side i have some css class uses background-position: x,y. The css code: .menu, .bg1, .bg2 { background-image:url(bg.png); background-repeat: no-repeat; padding-left: 50px; } .bg1 { …
Osiris
  • 131
  • 3
  • 16
-1
votes
1 answer

Stacking background: How to make it visible under another div

I have two column divs and I'm applying a big background to the second div, and shifting it with background-position to the left. I'd like it to keep being visible in its entirety and not get hidden under the first div WHILE avoiding to use negative…
George Katsanos
  • 13,524
  • 16
  • 62
  • 98
-2
votes
2 answers

CSS Background-Position Not Working?

I have the below code and I'm trying to add an attribute to center the background but it's not working. Existing Code:
squidg
  • 327
  • 3
  • 9
  • 23
-2
votes
1 answer

force FireFox to use background-position-y using JavaScript

Does anybody know a little JavaScript that allows background-position-y(and background-position-x) being displayed correctly in Firefox? that would save alot of stuff in the CSS.
-3
votes
2 answers

Css background position coordinates

I want to make css sprite with this image My html codes;
And css codes; .left{ background : url(arrw.png) no-repeat 0…
midstack
  • 2,105
  • 7
  • 44
  • 73
-5
votes
1 answer

100% height background starting at 50% horizontally

Desired effect: background image with 100% height and horizontally starts at 50% of the element. (The background ends before the right end of the element, or overflows hidden at the right edge of the element depending on the image / element size…
1 2 3
25
26