简体   繁体   English

修复Drupal主题中登录框的大小

[英]Fix Size of Login Box in Drupal Theme

I've asked this question previously here , and thought it was fixed, however, it is only fixed in firefox. 我之前在这里曾问过这个问题,并认为它是固定的,但是,它仅在firefox中固定。 In Safari the login box is now very wide, jutting out over the page contents. 在Safari中,登录框现在非常宽,突出页面内容。 Here is what it looks like in Safari , and here is what it looks like in Firefox . 这是Safari中的外观这是Firefox中的外观

I originally went about fixing it by creating a drupal module which changed the input "size" from 15 or to 43. I put my widerlogin.module code up on paste bin here , where a kind person helped me to where I am now. 我最初是通过创建一个drupal模块来解决该问题的,该模块将输入的“大小”从15更改为43。我将我的widelogin.module 代码放在了粘贴容器上 ,在那里,一个好心人帮助了我现在所在的位置。 43 was chosen by adjusting the number with firebug until it looked good, however, in safari there is no firebug, so I don't know what's going on to make it so wide. 通过用萤火虫调整数字直到看起来不错才选择了43,但是在野生动物园中没有萤火虫,所以我不知道是怎么回事使其如此广泛。 (it's also messed up on the iphone, presumably because it is safari) (它也被iPhone弄乱了,大概是因为它是野生动物园)

Thanks in advance for your help! 在此先感谢您的帮助! Oh, and the site that all this is happening on is innovatefortomorrow.org if you want to look at it for some reason. 哦,如果您出于某些原因要查看它,那么所有正在发生的站点是innovatefortomorrow.org。

A few CSS rules can fix the problem: 一些CSS规则可以解决此问题:

/*
 Make the login boxes stretch to the full container
*/
#edit-name {
 width: 100%;
}
#edit-pass {
 width: 100%;
}

/* 
 Add a little padding so the boxes don't stretch too far.
*/
#block-user-0 {
 padding-right: 5px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM