Skip to Content

How to use the background-size: cover; style for generic tile background image

Dec 09, 2017 at 06:22 AM


avatar image
Former Member


I have a generic title with background image, currently the image is not displayed within the tile boundaries and displayed perfectly when change element style property to background-size : cover.

How can we use CSS over here to adjust the image in the tile.



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Dec 09, 2017 at 10:23 AM


You started by saying "title" I'm guessing you meant tile.

  • Are you using the property backgroundImage ?
  • Can you resize the original image so to fit the tile in the way you want to?
  • How do you know that 'background-size: cover' works?
  • Why can't you give the tile a unique id and use css to adjust it?
  • Can you create a jsfiddle or any type of a sandbox to try and help you with? Share your code with mock data in it?
10 |10000 characters needed characters left characters exceeded