This forum is now read-only. Please use our new forums! Go to forums
[resolved] I can't seem to find a background image that fits for jumbotron.
I even searched for images with the same dimensions as the example image. How do I make it fit?
Answer 55af5466e39efe84020002cc
Hello Maxime,
you can do it in a few different ways, I would use the code
img {
width: 100%;
height: auto;
}
but this will make all your images fill 100% of the allowed space so use with caution. Maybe be a bit more specific and use .jumbotron img
You can also try some websites like unsplash.com as they do big free to use images
Thanks
Answer 55af979a9113cb4f8c0005af
1 comments
Keith Light over 8 years
no worries! Just be careful with over-stretching a small image, as well as being careful about image size in case people are viewing on mobile. I usually find a balance between the two
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
So where would I add this img element? The link to the jumbotron background image is IN the CSS file, not the HTML file. I can add a .jumbotron img even if there’s no img in the jumbotron div?