Html 右边的字段
我不知道怎么做: 发件人: 致: HTML/CSS:Html 右边的字段,html,css,Html,Css,我不知道怎么做: 发件人: 致: HTML/CSS: <style> input[type='text'] { width:246px; margin:2px 1px; padding:2px; } </style> <
<style>
input[type='text'] {
width:246px;
margin:2px 1px;
padding:2px;
}
</style>
<form action="/Handeler/control.php?p=add#" method="POST">
<strong>Let op: Als je een file via FTP of gewoon in de map uploads zet weet dan zeker dat de file match id(<u>yYW3D7</u>) het zelfde is als de bestandsnaam!!!</strong> <br />
File match ID: <input type="text" name="code" value="yYW3D7" disabled> <br />
Code: <input type="text" name="code" placeholder="Download code hier..." value=""> <br />
Verloopt op: <input type="text" name="code" placeholder="Download code hier..." value=""> <br />
Aantal keer gebruiken: <input type="text" name="code" placeholder="Aantal downloads hier..." value=""> <br />
IP whitelist: <input type="text" name="code" placeholder="IP hier. (laat leeg voor geen whitelist)" value=""><br />
</form>
输入[type='text']{
宽度:246px;
利润:2倍1倍;
填充:2px;
}
让我们开始:通过gewoon的FTP在地图中上传zet weet和zeker数据文件匹配id(yYW3D7)他是Als de bestandsnaam
文件匹配ID:
代码:
Verloopt op:
安塔尔·科尔·格布里肯:
IP白名单:
我试过位置:绝对和相对也浮动:对;但这不起作用
谢谢大家!
CSS
Html:
<form action="/Handeler/control.php?p=add#" method="POST">
<strong>Let op: Als je een file via FTP of gewoon in de map uploads zet weet dan zeker dat de file match id(<u>yYW3D7</u>) het zelfde is als de bestandsnaam!!!</strong>
<label>
<span>File match ID:</span>
<input type="text" name="code" value="yYW3D7" disabled />
</label>
<label>
<span>Code:</span>
<input type="text" name="code" placeholder="Download code hier..." value="" />
</label>
<label>
<span>Verloopt op:</span>
<input type="text" name="code" placeholder="Download code hier..." value="" />
</label>
<label>
<span>Aantal keer gebruiken:</span>
<input type="text" name="code" placeholder="Aantal downloads hier..." value="" />
</label>
<label>
<span>IP whitelist:</span>
<input type="text" name="code" placeholder="IP hier. (laat leeg voor geen whitelist)" value="" />
</label>
</form>
您需要标记
输入
的标签
一侧,并将其设置为特定的宽度,然后所有输入都将从指定的水平位置开始。也许你应该考虑为你的输入使用不同的名称?提交表单时,表单值会非常混乱
input[type='text'] {
width:246px;
margin:2px 1px;
padding:2px;}
label {
width:225px;
float:right;
display: inline-block;
}
</style>
<form action="/Handeler/control.php?p=add#" method="POST">
<strong>Let op: Als je een file via FTP of gewoon in de map uploads zet weet dan zeker dat de file match id(<u>yYW3D7</u>) het zelfde is als de bestandsnaam!!!</strong> <br />
<label for="code">File match ID: </label><input type="text" name="code" value="yYW3D7" disabled> <br />
<label for="code">Code: </label><input type="text" name="code" placeholder="Download code hier..." value=""> <br />
<label for="code">Verloopt op: </label><input type="text" name="code" placeholder="Download code hier..." value=""> <br />
<label for="code">Aantal keer gebruiken: </label><input type="text" name="code" placeholder="Aantal downloads hier..." value=""> <br />
<label for="code">IP whitelist: </label><input type="text" name="code" placeholder="IP hier. (laat leeg voor geen whitelist)" value=""><br />
</form>
input[type='text']{
宽度:246px;
利润:2倍1倍;
填充:2px;}
标签{
宽度:225px;
浮动:对;
显示:内联块;
}
让我们开始:通过gewoon的FTP在地图中上传zet weet和zeker数据文件匹配id(yYW3D7)他是Als de bestandsnaam
文件匹配ID:
代码:
Verloopt op:
安塔尔·科尔·格布里肯:
IP白名单:
像这样布局您的HTML
<div>
<label for="code">File Match ID:</label>
<input id="code" type="text" />
<div>
<!-- and repeat... -->
记住
class
更新HTML和CSS,并根据需要调整值。这只是一个例子。将标签放入
标签中,并给它们一个固定的宽度。不要只是“使用
”。在布局中使用CSS不仅仅是“无表”,它意味着更容易维护代码。假设有一天您想将布局从左到右改为上到下。要使用表格更改它,您需要在所有项目文件中进行大量剪切粘贴;使用CSS,您只需要更改一些规则。所以,继续学习和练习CSS,你走的路是对的。@AndréLeria,你也可以设计表元素的样式。IE的旧版本仍然是一个问题,与往常一样,但不要将其与逻辑参数混淆。这是一个常见的问题,有几个重复的问题(大部分答案都是劣质的,建议采用人为的样式,而不是使用表的稳健和逻辑方法,但仍然).我的理解是for属性采用输入字段的id。这就是为什么我更喜欢上面的嵌套标记,因为我可以避免提供输入ID(当文档上有多个类似的形式时,这会很有帮助,并且可以避免不必要的ID膨胀)。诚然,使用for和id似乎更为常见。关于标签的属性的选项的讨论非常酷,但我特别想指出,在这种情况下,相同的名称
属性会重复。啊。。。完全明白了。最好确保OP知道for应该使用ID,并且他们知道在服务器上只能获取一个代码值。@jameslafferty我刚刚阅读了标签位置讨论。似乎在使用id
和输入的客观性方面,始终有一些关于放置的优点。我的意思是,只要你在整个代码中保持一致,这是个人的偏好。这意味着设置任意的像素宽度。要比使用桌子灵活得多。@JukkaK.Korpela我已经更新了答案的样式,以解决您的问题。在这里使用表的最大问题是表是非语义的,我们可以使用css实现同样(或者说更)灵活的布局。
input[type='text'] {
width:246px;
margin:2px 1px;
padding:2px;}
label {
width:225px;
float:right;
display: inline-block;
}
</style>
<form action="/Handeler/control.php?p=add#" method="POST">
<strong>Let op: Als je een file via FTP of gewoon in de map uploads zet weet dan zeker dat de file match id(<u>yYW3D7</u>) het zelfde is als de bestandsnaam!!!</strong> <br />
<label for="code">File match ID: </label><input type="text" name="code" value="yYW3D7" disabled> <br />
<label for="code">Code: </label><input type="text" name="code" placeholder="Download code hier..." value=""> <br />
<label for="code">Verloopt op: </label><input type="text" name="code" placeholder="Download code hier..." value=""> <br />
<label for="code">Aantal keer gebruiken: </label><input type="text" name="code" placeholder="Aantal downloads hier..." value=""> <br />
<label for="code">IP whitelist: </label><input type="text" name="code" placeholder="IP hier. (laat leeg voor geen whitelist)" value=""><br />
</form>
<div>
<label for="code">File Match ID:</label>
<input id="code" type="text" />
<div>
<!-- and repeat... -->
div {
width: 300px;
}
label {
display: inline-block;
width: 80px;
}
input {
width: 200px;
}