- This topic is empty.
October 31, 2017 at 5:55 am #262082
Can anyone help me to center a banner in a responsive way. I need to inside a container, center the image on position Y and X according resolution and preferably fill without stretch the image.
I have this:
ps: ignore size image, maybe max.: 950px
background-position-y: 50% !important;
Best regardsOctober 31, 2017 at 6:12 am #262083Paulie_DModerator
Could you make a Codepen.io demo…it would be of much more use that a random snippet of CSS.October 31, 2017 at 9:12 am #262096November 1, 2017 at 5:40 am #262128Paulie_DModerator
I’m really not clear on what it is you are trying to do.
The banner is centered (especially as it’s 100% wide)…
As for the background image you have this set to
coverso naturally it stretches.
You might try
containbut without seeing what this is supposed to look like it’s hard to comment.November 4, 2017 at 12:59 pm #262208
With contain doesn´t work well, but with the cover stays better. Anyway, I put a background-position center center and change a little bit the .wrapper, now it´s fine.
- The forum ‘CSS’ is closed to new topics and replies.