Jump to content
  • 0

Как сдвинуть форму?


Dimaz
 Share

Question

Всем привет. Как можно сдвинуть форму относительно предыдущего элемента? Вот код:

<!DOCTYPE html>
<html>
<body>
<div style="height: 120px; width: 80px; float: left; background-color: green">
<p>Просто текст</p>
</div>
<form action="save_data.php" method="post" style="margin-left: 20px">
<p>
<b>Что вы предпочитаете выпить:</b><Br>
<input type="radio" name="drink" value="rad1">пиво<Br>
<input type="radio" name="drink" value="rad2">чай<Br>
<input type="radio" name="drink" value="rad3">кофе<Br>
<input type="image" src="images/imgbutton.png">
</p>
</form>

</body>
</html>

Если увеличить значение свойства margin-left с 20 на 200, то тогда расстояние изменяется. Как сделать так, чтобы отступ менялся относительно предыдущего элемента DIV?

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy