0
Why doesn't margin bottom work?
7 odpowiedzi
+ 2
// because random was not in the pic function
function pick() {
ran=Math.floor(Math.random()*5+0)
//console.log(ran)
document.getElementById("answer").innerHTML=answer[ran]
}
+ 2
What do you mean with margin bottom?
+ 2
Lego in Motion There are 3 reasons why your margin bottom is not working.
1. Order of precedence. You have margin: auto after the margin-bottom. There for margin auto takes over.
Simply change the order
2. margin bottom does not work because margin pushes outward from the element. Since there is nothing to push there is nothing to show.
by adding another element below the button element you will see a space between the elements.
Copy the button element to see it in action.
3. use px instead of %
+ 1
Great! Thank you! But now I need an answer to my other question.
+ 1
I don't understand your question. What do you want to achieve and with which elements?
Can you describe specifically how you want your website to look?
0
Oh also why doesn't it pick random every time you push the red button?
0
Go to the bottom of css