0
Why this code is not working?
This image slider is not working. And how to put figcaption under a image? https://code.sololearn.com/W69U8i9w8BH4/?ref=app
4 Antworten
+ 1
Mohan 333 Assign event to button and call functions like :
<button onclick="pre()">pre</button>
<button onclick="next()">next</button>
Do like : document.getElementById("img1").src=images[n];
Change var num to var n ; you are using all times n
0
It should be <button onclick="pre()">
otherwise it's basically a useless button
And you are using n, but you ment num
And script should be after the buttons
0
Jayakrishna🇮🇳 how to put figcaption under a image?
0
Mohan 333 defaultly it will adjust automatically either top or bottom. (i think bottom only, not sure).
See that removing all css, you can at bottom..
If not work make into a table form and add caption - side : bottom;
figure {
display: table;
}
figcaption {
display: table-caption;
caption-side: bottom;
}