Theming Drupal's user login block with CSS
http://api.drupal.org/api/function/user_login_block/6
Really, what is wanted is CSS
Here's a sample:
#block-user-0 .form-item /* "User login form" block */
{
margin-top: .5em;
margin-bottom: .5em;
}
#block-user-0 .form-item label /* "User login form" block */
font-weight: normal;
}
#block-user-0 .item-list ul, #user-login-form .item-list ul, #user-login-form .item-list ul li,
{
list-style-type: none;
}
#block-user-0 .item-list ul li
{
list-style-type: none;
margin-left: -2em;
}
#block-user-0 .item-list ul {
margin-top: .5em;
}
/** Drupal blocks **/
.block /* Block wrapper */
{
margin-top: .75em;
margin-bottom: 1.2em;
}
.block h2.title /* Block title */
{
font-size: 1.2em;
line-height: 1.1em;
background: url(images/bg_nav.png) repeat-x left bottom;
padding: .3em;
}
Yeah, I'm reusing the main navigation menu background on the block titles! But the part with the minimal improvements to Drupal's historically ugly login form block is above that. I think somewhere else must be setting the text-align to left as normal, or maybe only some common Drupal themes do the strange center alignment.
Comments
Thanks, and pls help me with something more
How can I change the user logIn block content, Like
I want to change:
'User' instead of 'username' and
the text box need to be beside the label, not below the label
thanks in advance
change 'Request new password' to 'Forgot your password'
Hi,
Go to user.module. The you can change 'Request new password' to 'Forgot your password' and you can hide the 'create new account' link
Should never edit a core or contributed module directly new
When it can be avoided, "don't hack core". This could be done with form altering, theme overriding, and/or your own block.
Post new comment