html css utf8
仔细看一下不难发现,登录名和密码输入栏不一边长,为啥?下拉菜单前面为啥有空格?(附代码)
用户管理
当前位置:用户管理 >> 添加用户
添加新用户
登录名: 登录账号信息
密码: 登录密码信息
用户角色: 用户角色信息
@charset utf8;.login_top_bg { background-image: url(../images/login-top-bg.gif); background-repeat: repeat-x;}.body { background-color: #eef2fb; left: 0px; top: 0px; right: 0px; bottom: 0px;}.login-buttom-bg { background-image: url(../images/login-buttom-bg.gif); background-repeat: repeat-x;}.login-buttom-txt { font-family: arial, helvetica, sans-serif; font-size: 10px; color: #abcad3; text-decoration: none; line-height: 20px;}.login_txt { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #333333;}.submit { font-family: arial, helvetica, sans-serif; font-size: 12px; color: #629dae; text-decoration: none; background-image: url(../images/submit_bg.gif); background-repeat: repeat-x;}.login_bg { background-image: url(../images/login_bg.jpg); background-repeat: repeat-x;}.login_bg2 { background-image: url(../images/login-content-bg.gif); background-repeat: no-repeat; background-position: right;}.admin_txt { font-family: arial, helvetica, sans-serif; font-size: 12px; color: #ffffff; text-decoration: none; height: 38px; width: 100%; line-height: 38px;}.login_txt_bt { font-family: arial, helvetica, sans-serif; font-size: 14px; line-height: 25px; color: #666666; font-weight: bold;}.admin_topbg { background-image: url(../images/top-right.gif); background-repeat: repeat-x;}.txt_bt { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #000000; text-decoration: none;}.left_topbg { background-image: url(../images/content-bg.gif); background-repeat: repeat-x;}.admin_toptxt { font-family: arial, helvetica, sans-serif; font-size: 12px; color: #4a8091; height: 18px; width: 100%; overflow: hidden; position: fixed;}.left_bt { font-family: arial, helvetica, sans-serif; font-size: 14px; font-weight: bold; color: #395a7b;}.left_bt2 { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #333333;}.titlebt { font-size: 12px; line-height: 26px; font-weight: bold; color: #000000; background-image: url(../images/top_bt.jpg); background-repeat: no-repeat; display: block; text-indent: 15px; padding-top: 5px;}.left_txt { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #666666;}.left_txt2 { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #000000;}.view_title { font-family: arial, helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #666666; text-align: center;}.view_list { font-family: arial, helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #000000; text-align: center;}.view_page { font-family: arial, helvetica, sans-serif; font-size: 13px; font-weight: bold; line-height: 25px; color: #191964; text-align: center;}.view_checkbox { font-family: arial, helvetica, sans-serif; font-size: 13px; line-height: 25px; color: #000000; text-align: left;}.nowtable { background-color: #e1e5ee; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-top-color: #bfc4ca; border-right-color: #bfc4ca; border-bottom-color: #bfc4ca; border-left-color: #bfc4ca;}.left_txt3 { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; color: #003366; text-decoration: none;}.left_ts { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; font-weight: bold; color: #ff6600;}.line_table { border: 1px solid #cccccc;}.sec1 { cursor: hand; color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; border: 1px solid #b5d0d9; background-image: url(../images/right_smbg.jpg); background-repeat: repeat-x;}.sec2 { font-weight: bold; cursor: hand; color: #000000; font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 25px; background-color: #e2e7ed; border: 1px solid #e2e7ed;}.main_tab { color: #000000; background-color: #e2e7ed; border: 1px solid #e2e7ed;}.mm a { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 26px; color: #666666; background-image: url(../images/menu_bg.gif); background-repeat: no-repeat; list-style-type: none; list-style-image: none;}a:link { font-size: 12px; line-height: 25px; color: #333333; text-decoration: none;}a:hover { font-size: 12px; line-height: 25px; color: #666666; text-decoration: none;}a:visited { font-size: 12px; line-height: 25px; color: #333333; text-decoration: none;}.mm a:link { font-family: arial, helvetica, sans-serif; font-size: 12px; line-height: 26px; color: #666666; background-image: url(../images/menu_bg.gif); background-repeat: no-repeat; list-style-type: none; list-style-image: none;}
回复讨论(解决方案) 是不是在chrome下才这样,测试了下,在ie9和ff下没有这种情况,在chrome下会发生这样的情形了,应该是chrome浏览器为type=password,自动加载了个样式:
input:not([type]), input[type=color], input[type=email], input[type=number], input[type=password], input[type=tel], input[type=url], input[type=text] {
padding: 1px 0px;
}
而如果不是password,自动加载了另一个样式:
input, input[type=password], input[type=search], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
是不是在chrome下才这样,测试了下,在ie9和ff下没有这种情况,在chrome下会发生这样的情形了,应该是chrome浏览器为type=password,自动加载了个样式:
input:not([type]), input[type=color], input[type=email], input[type=number], input[type=password], input[type=tel], input[type=url], input[type=text] {
padding: 1px 0px;
}
而如果不是password,自动加载了另一个样式:
input, input[type=password], input[type=search], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
我用的ie6和chrome测试的。。。
是不是在chrome下才这样,测试了下,在ie9和ff下没有这种情况,在chrome下会发生这样的情形了,应该是chrome浏览器为type=password,自动加载了个样式:
input:not([type]), input[type=color], input[type=email], input[type=number], input[type=password], input[type=tel], input[type=url], input[type=text] {
padding: 1px 0px;
}
而如果不是password,自动加载了另一个样式:
input, input[type=password], input[type=search], isindex {
-webkit-appearance: textfield;
padding: 1px;
。。。。。。。
}
这样就长短出来了。
我用的ie6和chrome测试的。。。
为“” 加个样式:padding: 1px;就好了,至少chrome下能好,ie6没办法,我这边模拟不了。
为“” 加个样式:padding: 1px;就好了,至少chrome下能好,ie6没办法,我这边模拟不了。
不行,加了两边都会不齐,而且主要问题是那个下拉框,那个空了太多。
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
padding: 1px;
}
在chrome中测试成功。这个是解决长短不一的。
3.你那个下拉框把html代码贴出来,你贴出来的是引入了个php文件。
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
padding: 1px;
}
在chrome中测试成功。这个是解决长短不一的。
3.你那个下拉框把html代码贴出来,你贴出来的是引入了个php文件。
我是这样加的啊,也是chrome。。。效果就是相对于上面的框移到了中间位置,结果两边都多出来一点点
rolepri($_session[ss_user_id]); //循环将用户角色写入下拉框选项中 echo ; foreach($role->minforarray as $item) { echo roleid.>.$item->rolename.; } echo ?>
sqlstring=select * from user; $db->sqlstring=$db->sqlstring. where userid=$puserid ; $db->query(); $this->mrolearray=$db->mresultarray; $this->proleid= $this->mrolearray[0]->roleid; $db->__destruct();}function rolepri($puserid){ require(sys_conf.inc); require_once(database.php); $db=new database($dbhost,$dbuser,$dbpwd,$dbname); $this->getroleidfromuserid($puserid); //获取基本信息 $db->sqlstring=select * from role where roleid proleid; $db->query(); $this->minforarray=$db->mresultarray; $db->__destruct(); }}?>
这样加:
1.那个input加个class “”
2.在css文件中加:
.in-password {
padding: 1px;
}
在chrome中测试成功。这个是解决长短不一的。
3.你那个下拉框把html代码贴出来,你贴出来的是引入了个php文件。
我是这样加的啊,也是chrome。。。效果就是相对于上面的框移到了中间位置,结果两边都多出来一点点
rolepri($_session[ss_user_id]); //循环将用户角色写入下拉框选项中 echo ; foreach($role->minforarray as $item) { echo roleid.>.$item->rolename.; } echo ?>
sqlstring=select * from user; $db->sqlstring=$db->sqlstring. where userid=$puserid ; $db->query(); $this->mrolearray=$db->mresultarray; $this->proleid= $this->mrolearray[0]->roleid; $db->__destruct();}function rolepri($puserid){ require(sys_conf.inc); require_once(database.php); $db=new database($dbhost,$dbuser,$dbpwd,$dbname); $this->getroleidfromuserid($puserid); //获取基本信息 $db->sqlstring=select * from role where roleid proleid; $db->query(); $this->minforarray=$db->mresultarray; $db->__destruct(); }}?>
php代码我看不懂的。。。。。。。你把这些代码生成后的html代码贴出来就行了。
密码框和文本框的默认宽度是不一样的 你要设置一个指定的宽度
select一样设置一个宽度比较好
roleid > $item->rolename;
大概就是这样子
兄弟别怪我吐槽。。。 看到table用来布局 我就。。。。
密码框和文本框的默认宽度是不一样的 你要设置一个指定的宽度
select一样设置一个宽度比较好
嗯呢,文本框密码框改过来了,但是select好像不行,这个是位置不对,大小无所谓。
兄弟别怪我吐槽。。。 看到table用来布局 我就。。。。
怎么啦 我不太懂,我都是网上找的直接下来用。
觉得是样式问题呢
觉得是样式问题呢
我已经解决了,把select写在php外面就好了。 我已经解决了,把select写在php外面就好了。
good job