Skip to Content

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

Hi,

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.

Regards,

Narayan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Dec 09, 2017 at 10:23 AM

    Hey,

    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?
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.