标题可能有点模糊,但这是对我的问题的最好解释。我在我的CSS代码中弄乱了一些内容,该代码当前使表单保持在一个奇怪的大小,即宽度接近0。
我添加了图片以显示其外观:
我尝试添加width: 100px;到我的CSS文件中,但没有执行任何操作。这是CSS和HTML代码:
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
-moz-appearance: none;
-webkit-appearance: none;
-ms-appearance: none;
appearance: none;
background: rgba(144, 144, 144, 0.075);
border-radius: 0;
border: none;
border: solid 1px #dbdbdb;
color: inherit;
display: block;
outline: 0;
padding: 0 1em;
text-decoration: none;
background-color: grey;
width: 100px;
}
input[type="text"],
input[type="password"],
input[type="email"],
select {
height: 2.75em;
width: 100px;
}
textarea {
padding: 0.75em 1em;
margin-bottom: 20px;
resize: vertical;
width: 100px;
height: 100px;
}Run Code Online (Sandbox Code Playgroud)
<?php
if(isset($_SESSION["username"]) and $_SESSION["username"] == "No User")
{
echo"<form action='index.php' method='post'>
<input type= 'text' name='gebruikersid' placeholder='Gebruikersnaam' size='20' maxlength='20' required>
<input type= 'email' name='mail' placeholder='Email Addres' size='20' maxlength='50' required>
<input type= 'password' name='wachtwoord' placeholder='Wachtwoord' size='20' maxlength='30' required>
<input type= 'password' name='wachtwoordcheck' placeholder='Wachtwoord bevestigen' size='20' maxlength='30' required>
<input type= 'text' name='voornaam' placeholder='Voornaam' size='20' maxlength='30' required>
<input type= 'text' name='achternaam' placeholder='Achternaam' size='20' maxlength='30' required>
<select name='sekse'>
<option value='Man'>Man</option>
<option value='Vrouw'>Vrouw</option>
</select>
<input type='submit' name='reg' value='Registreer'>
</form>";
}
?>Run Code Online (Sandbox Code Playgroud)
由于某些原因,当我从Stack Overflow运行此程序时,它看起来应该看起来像。这是否意味着这部分代码没有错?因为在那种情况下,我将不得不去看其他部分,但是我不确定。
| 归档时间: |
|
| 查看次数: |
44 次 |
| 最近记录: |