+ 1
How repeat single image one after one without any blank in css?
Run-Run Bike-Car
3 Answers
0
https://code.sololearn.com/WYZnBOJx73u1/?ref=app
in this code
i want to repeat image "city.png"
#Rick Grimes
@Arb Rahim Badsa
+ 1
Arun Please add your code too :))
+ 1
image tag is an inline tag so it won't go in newline by default.
i think you don't need to use any special css for aligning images in one line.
just put them one after other and they will be in same line until they have space for it.
html:
<div>
<img src="image1.jpg" alt="" />
<img src="image2.jpg" alt="" />
<img src="image3.jpg" alt="" />
</div>
style:
div {
width: 100%;
height: 300px;
}
div img {
width: 33.33%;
height: 100%;
}