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
Release: 2016-06-24 12:23:40
Original
1577 people have browsed it

I present my code:







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>
Copy after login

<!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>
Copy after login

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template