Home >Web Front-end >HTML Tutorial >How to insert multiple buttons into a div. The teacher helped me insert two buttons, but the third button failed_html/css_WEB-ITnose

How to insert multiple buttons into a div. The teacher helped me insert two buttons, but the third button failed_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:23:401581browse

I present my code:
080b747a20f9163200dd0a7d304ba388
body{
background:#999;
height:768px;
width:100 %;
}
531ac245ce3e4fe3d50054a55f265927
93f0f5c25f18dab9d176bd4f6de5d30e
6c04bd5ca3fcae76e30b72ad730ca86d
91a278c81134ff6d4c20c3d6ccdedb3e
91323c5301f88633793ce443f9e7ef3233f3e4c844caadc237ce4baac02d7bb44de1dddcaa4a3771651a7b62cfb716b6
3e54271c76a0ea2556aa989dd2a47ed0
29a392b0f42ef6d657af7bf5d838d85d

91323c5301f88633793ce443f9e7ef32e03ad12dc9acd33ceb6973319acd0e225db79b134e9f6b82c0b36e0489ee08ed
16b28748ea4df4d9c2150843fecfba68


Reply to the discussion (solution)

The first two buttons the teacher made for me were fine, but the last one didn’t work = =!

Please ask God = =! Where is the great god = =!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="div1" style="padding-top:500px;float:left"><a href="zhuye.html"><input type="butoon" id="butoon1" name="注册" value="注册"/></a></div><div id="div2" style="padding-top:500px;float:left"><a href="zhuye.html"><input type="butoon" id="butoon2" name="主页" value="主页" /></div><div id="div3" style="padding-top:500px "><a href="zhuye.html"><input type="butoon" id="butoon3" name="释义" value="释义"/></a></div></body></html>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>无标题文档</title></head><body><div id="div1" style="padding-top:500px;float:left"><a href="zhuye.html"><button id="butoon1" name="注册">注册</button></a></div><div id="div2" style="padding-top:500px;float:left"><a href="zhuye.html"><button id="butoon2" name="主页">主页</button></a></div><div id="div3" style="padding-top:500px "><a href="zhuye.html"><button id="butoon3" name="释义"> 释义</button></a></div></body></html>

The above is wrong

There are many problems with these few lines of code
The first float is in style There are multiple floats in style The style is separated with;
The second href is followed by no; number
The third input does not have a closing tag. You are obviously having a nesting problem
The fourth is what you said, the third will not work because the third The emergence of this problem So the first problem that caused you
The last problem is that the first two are floating, and the third one is also floating.

Why do you need to nest input in a? Please explain it.

There are a lot of grammatical errors. The tag is not closed, the float position is written incorrectly

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn