Make a Compact Horizontal Account Options Menu

Posted by cold_blood3d on 08 May 2009 22:23, last edited by gerdami on 30 Dec 2009 13:20

Tags: account css login-status

rating: +4+x

Description

Sometimes it is not convenient to have the Account Options menu drop down vertical. It might interfere with ads (which is why I used this), or perhaps you want a cool new look. By applying a few simple CSS rules, you can get a horizontal account options menu that conceals the your login status/username button until you move the mouse away.

See it in action

See http://l4dmapdb.com or http://scmapdb.wikidot.com for an example. While logged in, click on the button next to your login status/username to see the menu appear.

Screenshots

Folded
account-folded.png
Unfolded
account-unfolded-horizontal.png

The CSS

You will need to know how to use custom CSS to proceed. If you don't know how to use custom CSS, please find the appropriate HowTo.

#login-status {
    left:0;
    top:-30px;
    width:100%;
}
#account-options {
    position:absolute;
    left:0;
    top:-9px;
    right:auto;
    width:100%;
    height:50px;
    overflow-y:hidden;
    color:#b00000;
    background-color:#000000;
    border:0;
}
#account-options ul, #account-options li {
    display:inline;
}
#account-options li a {
    display:block;
    padding:0;
    padding-top:10px;
    padding-bottom:20px;
    height:50px;
    padding-right:1.5em;
    float:left;
    font-size:92%;
    color:#b00000 !important;
}
#account-options li a:hover {
    color:#f0f0f0 !important;
}

This will make your login status menu align to the left of the screen (similar to the example, but without the search box). When you click on the button, the account options menu will be displayed horizontally and completely hide login status/username to make the most of the available space.

You may want to customize the position to get it where you want, and change the colors. Be careful adjusting any other properties; they are needed to keep this working properly.

Add a New Comment

Related articles

Comments

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.