【发布时间】:2014-04-15 03:35:06
【问题描述】:
我目前正在处理一个包含许多字段的表单,并且我试图将它们都很好地放入一个高度为 400 像素、宽度为 510 像素的框中。在编辑高级 CSS 时,我非常讨厌(这对我来说是高级的)。
如果有人能帮我解决这个问题,我会很高兴的!我不是想为我完成这件事,而是如果有人这样做或解释了如何做,它真的会帮助我自己学习如何做。
- 我无权访问 html
- 我正在从另一个我也无权访问的服务器中提取样式表
- 我需要 15 个表单域才能(整齐地)适应 400x510 像素的空间
CSS:
#qw {
width: 100%;
height: 400px;
background-color: #transparent;
border-radius: 0 0 0px 0px;
padding: 0px;
font: 14px/20px sylfaen, garamond, 'urw palladio l', georgia, serif;
}
#qw #qw_header {
background-image:;
width: 100%;
height: 68px;
}
#qw label {
display: none;
}
#qw fieldset {
border: none;
margin-top: 0px;
padding-top: 0px;
padding-left: 8px;
}
#qw fieldset legend {
visibility: hidden;
}
#qw fieldset input, #qw fieldset select {
width: 93%;
border: 1px solid #bbb;
border-top-color: #777;
border-bottom-color: #ddd;
padding: 4px;
margin-bottom: 4px;
font-size: 16px;
font-family: helvetica, arial, sans-serif;
height: 18px;
}
#qw fieldset select {
height: 28px;
width: 100%;
}
#qw .qw_personal_header {
text-align: center;
}
#qw .qw_personal_header:before {
content:'You';
text-transform: uppercase;
font-size: 16px;
color: #000;
width: 100%;
}
#qw .qw_personal:after {
clear: both;
}
#qw .qw_vehicle_header {
text-align: center;
clear:both;
}
#qw .qw_vehicle_header:before {
clear: both;
font-size: 16px;
content:' Car';
text-transform: uppercase;
color: #000;
width: 100%;
}
#qw .qw_first_name, #qw .qw_last_name, #qw .qw_zip_code, #qw .qw_city, #qw .qw_state, #qw .qw_phone, #qw .qw_email {
float: left;
width: 45%;
margin: 5px;
}
#qw .qw_monthly_income, #qw .qw_vehicle_year, #qw .qw_vehicle_make, #qw .qw_vehicle_model, #qw .qw_vehicle_mileage, #qw .qw_vehicle_owned {
float: right;
width: 45%;
margin: 5px;
}
#qw .qw_vehicle_owned {
width: 93%;
}
#qw .submit {
margin-top: 10px;
text-align: center;
}
#qw .submit input {
background:url cursor:pointer;
height: 46px;
width: 297px !important;
font-size: 0px;
border: none;
}
#qw .qw_legal {
font-size: 12px;
color: #000;
padding-left: 15px;
padding-right: 15px;
line-height: 12px;
}
#qw .qw_legal a {
color: black;
text-decoration:underline;
}
#qw .submit input {
width: 80%;
}
【问题讨论】:
-
如果你知道一个肯定的,但如果有人要做一些,我可以查看调整并可能弄清楚:)
-
这似乎是“太宽泛”的一个很好的例子。
-
是不是太宽泛了? CSS 在那里,目标也在那里。如果我应该包含更多内容,请告诉我。
-
我看到了 css,但我没有看到要应用它的 html?
-
@Dr.Tenma 您可能应该提供 HTML 以缩小问题的范围……