在我写
之前,我的网页设计仍然正常一旦我使用它,网络的内容部分干扰代码如下
<?php echo form_open('regform/register');?>
<div class="first">
<fieldset>
<label for="name"><strong>Name:<br /></strong> </label><input type="text" name="name" maxlength="55" id="name" class="inputtext" />
<label for="email"><strong>Email:<br /></strong></label><input type="text" name="email" maxlength="55" id="email" class="inputtext" />
<label for="password"><strong>Password:<br /></strong></label><input type="text" name="password" maxlength="55" id="password" class="inputtext" />
<label for="confirmpass"><strong>Confirm Password:<br /></strong></label><input type="text" name="confirm" maxlength="55" id="confirmpass" class="inputtext" />
<div>
<label for="newsletter"><input type="checkbox" id="newsletter" /><span>Subscribe to newsletter</span></label>
<label class="terms" for="terms"><input type="checkbox" id="terms" /><span>I agree to the Terms and Conditions</span></label>
</div>
</fieldset>
</div>
<div>
<fieldset>
<label for="completename"><strong>Complete name:</strong></label><input type="text" maxlength="55" id="completename" class="inputtext" />
<label for="address"><strong>Primary address:</strong></label><input type="text" maxlength="55" id="address" class="inputtext" />
<label for="billing"><strong>Billing address:</strong></label><input type="text" maxlength="55" id="billing" class="inputtext" />
<label for="city"><strong>City:</strong></label><label class="zipcode" for="zipcode"><strong>Zip Code:</strong></label>
<input type="text" maxlength="30" id="city" />
<input type="text" maxlength="30" id="zipcode" class="zipcode" />
<div>
<label for="shipping"><input type="checkbox" id="shipping" /><span> Same Shipping and Billing address</span></label>
<label class="saveas" for="saveas"><input type="checkbox" id="saveas" /><span> Save as default address</span></label>
</div>
</fieldset>
</div>
<input type="submit" value="" id="createaccount" />
</form>
</div>
这是它使用“php echo form_open”
后的样子
这是该部分的.css文件
content div form div {
background: url(../images/bg-form.jpg) no-repeat;
float: left;
height: 396px;
margin: 0 0 0 24px;
padding: 0;
width: 463px;
}
#content div form div.first {
margin-left: 0;
}
#content div form div fieldset {
border: 0;
margin: 20px auto;
width: 386px;
}
#content div form div fieldset input.inputtext {
background: url(../images/sprites-inputs.gif) no-repeat 0 -42px;
border: 0;
height: 31px;
margin: 10px 0;
padding: 0 5px;
width: 376px;
}
#content div form div fieldset input#city {
background: url(../images/sprites-inputs.gif) no-repeat 0 0;
border: 0;
height: 32px;
margin: 10px 0;
padding: 0 5px;
width: 172px;
}
#content div form div fieldset label.zipcode {
margin-left: 168px;
}
#content div form div fieldset input#zipcode {
background: url(../images/sprites-inputs.gif) no-repeat 0 0;
border: 0;
height: 32px;
margin: 0 0 0 15px;
padding: 0 5px;
width: 172px;
}
#content div form div div {
background: none;
float: none;
height: auto;
margin-left: 0;
margin-top: 33px;
width: auto;
}
答案 0 :(得分:0)
我认为您错过了表单元素的类
就像使用它一样
echo form_open('your_url', array(
'class' => 'your classes',
'role' => 'role of form'
));