-1

So I have recently been coding a game (a clone of the game agar.io), and I have run into this problem where I can't move a button. its stuck, even though if add left: X; and top: X; I have searched so many places for a fix, but can't find anything. Here is the code:

<button style="width: 15%;float: left !important; left: 10px; and top: 10px;" onclick="document.getElementById('id01').style.display='block'" class="btn btn-success">Select Skin <i class="fui-user"></i></button>

Thanks, sorry if its a bit unclear.

1 Answers1

0

The box offset properties that you are using (left et al) only apply to positioned elements.

These are elements where the position property is set to a value other than static, but static is the default and you haven't changed it.

Look at absolute, fixed, and relative.

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335
  • If this answered your question, go ahead and click the green check mark under the voting area (the number to the left of the question). This will mark it as "answered", give Quentin 15 rep, give you 2 rep, and let other users know that the problem has been fixed. – Cullub Nov 07 '16 at 19:44