我的css遇到了一些麻烦,我有一个内容ID,然后在里面我有一个只是填充的类.在填充类中,我有一个textarea和一个提交按钮.默认情况下,提交按钮位于左侧:
但是,当我将提交按钮对齐到内容的左侧或右侧时,它会继续,但它也会超出内容,就像它不再是它的一部分:
这些是我的html和css代码
CSS:
#content {
width: 60%;
background: #dddddd;
color: #000;
margin: 0 auto;
border-radius: 4px;
margin-bottom: 10px;
height: auto;
}
.content-padding {
padding: 10px;
}
.content-post {
width: 97.5%;
height: 80px;
border: 0px;
background: #fff;
resize: none;
padding: 10px;
outline: none;
margin-bottom: 5px;
border-radius: 4px;
}
.content-submit {
background: #005ddb;
width: 70px;
height: 30px;
border: 0px;
border-radius: 4px;
color: #fff;
outline: none;
cursor: pointer;
float: right;
}
我希望有人能帮助我尽快解决这个问题,谢谢!