繁体   English   中英

我的提交按钮和选择按钮将该页面上的所有单词都移到左侧

[英]my submit buttons and select button shift all the words on that page to the left

正如您在图1中看到的那样,我的“权利保留”是集中的。 但在图2中,单词向左移动。

这是我的图片1的HTML代码:

 <form action="Chapter 1.html" data-inline="true" style="float:right"> <input type="submit" value="Next >"> </form> </style> <div align="right"> <select id="change" onchange="location = this.options[this.selectedIndex].value;"> <option value="Introduction.html">1. Introduction</option> <option value="Chapter 1.html">2. Chapter 1</option> </select> </div> 

我的代码为图2:

  <form action="Chapter 2.html" data-inline="true" style="float:right"> <input type="submit" value="Next >"> </form> </style> <select id="change" onchange="location = this.options[this.selectedIndex].value;" style="float:right"> <option value="Introduction.html">1. Introduction</option> <option value="Chapter 1.html">2. Chapter 1</option> </select> <form action="Introduction.html" style="float:right"> <input type="submit" value="< Prev" id="previous"> </form> </style> 

我的两张图片的css代码:

 input[type=submit] { width: 5em; height: 2em; border-radius: 5px; webkit-border-radius: 5px; background: webkit-linear-gradient(#fff, #ddd); background: linear-gradient(#fff, #ddd); } input[type=submit]:hover { background: #ddd; } #previous { width: 5em; height 2em; border-radius: 5px; webkit-border-radius: 5px; } #change{ width: 9em; height: 2em; border-radius: 5px; webkit-border-radius: 5px; } 

根据要求,这是我的权利保留代码,html代码是第一个,而第二个是jScript代码,第三个是css代码:

<footer id="foot01"></footer>

 document.getElementById("foot01").innerHTML = "<p><center>&copy; "+ new Date().getFullYear() + " Richard. All rights reserved.</center></p>"; 

 footer#foot01 { color: #000; align:center; } 

我在这做错了什么? :/

您是浮动formsselect right项目。 然后你需要对footer应用一个clear

footer#foot01 {
    clear: right;
}

DEMO

注意:您还有其他错误,例如HTML中的</style>标记和align:center; 应该是text-align: center;

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM