css标签codelist的下拉框怎么和输入框结合在一起?
1个回答
展开全部
我要实现的结果是:
id是txtUserCode的输入框和id是txtAge的输入框左边对齐;
id是txtUserName的输入框和id是txtEmail的输入框左边对齐;
id是txtSex的输入框和id是ddlHeadShip的下拉框左边对齐,并且txtSex输入框的右边和ddlDepartment下拉框的右边对齐;
请问:有css如何实现?
下面是我的代码,我写的css实现不了,请高人帮我完善一下,谢谢了!分不够可以加呀
代码:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>用户信息</title>
<style type="text/css" >
.divContent
{
float:left;
}
#txtUserCode
{
left:200px;
}
#txtAge
{
left:200px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="divContent">
<span>
<asp:Label ID="Label1" runat="server" Text="用户编号"></asp:Label>
<asp:TextBox runat="server" ID="txtUserCode"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label2" runat="server" Text="用户姓名"></asp:Label>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label3" runat="server" Text="性别"></asp:Label>
<asp:TextBox ID="txtSex" runat="server"></asp:TextBox>
</span>
</div>
<div class="divContent" >
<span>
<asp:Label ID="Label4" runat="server" Text="年龄"></asp:Label>
<asp:TextBox ID="txtAge" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label5" runat="server" Text="邮箱"></asp:Label>
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label6" runat="server" Text="岗位"></asp:Label>
<asp:DropDownList ID="ddlHeadShip" runat="server"></asp:DropDownList>
<asp:Label ID="Label7" runat="server" Text="部门"></asp:Label>
<asp:DropDownList ID="ddlDepartment" runat="server"></asp:DropDownList>
</span>
</div>
</div>
</form>
</body>
</html>
更多0
id是txtUserCode的输入框和id是txtAge的输入框左边对齐;
id是txtUserName的输入框和id是txtEmail的输入框左边对齐;
id是txtSex的输入框和id是ddlHeadShip的下拉框左边对齐,并且txtSex输入框的右边和ddlDepartment下拉框的右边对齐;
请问:有css如何实现?
下面是我的代码,我写的css实现不了,请高人帮我完善一下,谢谢了!分不够可以加呀
代码:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>用户信息</title>
<style type="text/css" >
.divContent
{
float:left;
}
#txtUserCode
{
left:200px;
}
#txtAge
{
left:200px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="divContent">
<span>
<asp:Label ID="Label1" runat="server" Text="用户编号"></asp:Label>
<asp:TextBox runat="server" ID="txtUserCode"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label2" runat="server" Text="用户姓名"></asp:Label>
<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label3" runat="server" Text="性别"></asp:Label>
<asp:TextBox ID="txtSex" runat="server"></asp:TextBox>
</span>
</div>
<div class="divContent" >
<span>
<asp:Label ID="Label4" runat="server" Text="年龄"></asp:Label>
<asp:TextBox ID="txtAge" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label5" runat="server" Text="邮箱"></asp:Label>
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
</span>
<span>
<asp:Label ID="Label6" runat="server" Text="岗位"></asp:Label>
<asp:DropDownList ID="ddlHeadShip" runat="server"></asp:DropDownList>
<asp:Label ID="Label7" runat="server" Text="部门"></asp:Label>
<asp:DropDownList ID="ddlDepartment" runat="server"></asp:DropDownList>
</span>
</div>
</div>
</form>
</body>
</html>
更多0
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询