无法将Struts2中的文本字段与CSS对齐

时间:2018-12-13 03:22:00

标签: css struts2

我正在使用struts2和CSS,并且试图使文本字段和密码字段框与“ Welcome to DropMusic”文本居中,但是,如果DropMusic中的音乐未插入换行符,则无法执行此操作。 我已经尝试了很多在线解决方案,但仍然无法做到这一点:(

这是我的CSS和.jsp html代码:

CSS

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: Poppins-Regular, sans-serif;
}

.wrap-input100 {
    position: relative;
    width: 100%;
    z-index: 1;
    margin-bottom: 10px;

}

.input100 {
    font-family: Poppins-Medium;
    font-size: 15px;
    line-height: 1.5;
    color: #666666;
    border: solid 0px black;
    display: block;
    width: 50%;
    background: #e6e6e6;
    height: 50px;
    border-radius: 25px;
    padding: 0 30px 0 68px;
    margin-bottom: 10px;

}

.limiter {
    width: 100%;
    margin: 0 auto;
}



.container-login100 {
    width: 100%;
    min-height: 100vh;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 15px;
    background: black;
}

.wrap-login100 {
    width: 1200px;
    height: 650px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 177px 130px 33px 95px;
}

.login100-form-title {
    font-family: Poppins-Bold;
    font-size: 24px;
    color: #333333;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    display: block;
    padding-bottom: 5px;
}

index.jsp

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <link rel="stylesheet" type="text/css" href="style.css">

<title>Welcome to DropMusic</title>
</head>
<body>
    <s:div cssClass="limiter">
        <s:div cssClass="container-login100">
            <s:div cssClass = "wrap-login100">
                <span class="login100-form-title">
                        Welcome to Drop Music
                </span>
                <s:form action="login" method="post">
                    <s:textfield cssClass="input100" name = "username" placeholder="Username" required="true" />
                    <s:password cssClass = "input100" name = "password" placeholder="*************" required="true" />
                    <p> </p>
                <s:submit value="Login"/>
                </s:form>
            </s:div>
        </s:div>
    </s:div>
</body>
</body>
</body>
</html>

预先感谢:)

0 个答案:

没有答案