This forum is now read-only. Please use our new forums! Go to forums
How do I make an image go below the other rather than next to it?
If I have two images, how do I arrange the code so that the second will go below the first one rather than next to it. When I preview the page, the two images keep showing up next to each other.
Answer 55e2e35851b887dc0900031c
0 votes
images are inline elements, which means they will arrange themselves besides each other unless you specify different. There are a few things you can do, the easiest (and dirtiest) way is to insert a break:
<img src="#">
<br>
<img src="#">
Or you could wrap your images inside a div:
<div>
<img src="#">
</div>
<div>
<img src="#">
</div>
or you could tell your image to behave like a block, rather then wrapping a block around it:
<style>
img { display: block; }
</style>
All this will be explained in the course later on (except for the break, but the break is easy)
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
you’re welcome