The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Dropdown Menu

3 posters

Go down

In progress Dropdown Menu

Post by DesignersSociety April 15th 2013, 9:36 pm

I'm trying to create a dropdown menu for my site but only want certain pages viewable to guests or members etc. I want to add things like the login logout and join. Here is what I have so far...
Below is the CSS

Code:
#nav{
    list-style:none;
    font-weight:bold;
    margin-bottom:10px;
    /* Clear floats */
    float:left;
    width:100%;
    /* Bring the nav above everything else--uncomment if needed.
    position:relative;
    z-index:5;
    */
}
#nav li{
    float:left;
    margin-right:10px;
    position:relative;
}
#nav a{
    display:block;
    padding:5px;
    color:#333;
    background:#fff;
    text-decoration:none;
}
#nav a:hover{
    color:#333;
    background:#fff;
    text-decoration:none;
}

/*--- DROPDOWN ---*/
#nav ul{
  background:#fff; /* Adding a background makes the dropdown work properly in IE7+. Make this as close to your page's background as possible (i.e. white page == white background). */
    background:rgba(255,255,255,255); /* But! Let's make the background fully transparent where we can, we don't actually want to see it if we can help it... */
    list-style:none;
    position:absolute;
    left:-9999px; /* Hide off-screen when not needed (this is more accessible than display:none;) */
}
#nav ul li{
    padding-top:1px; /* Introducing a padding between the li and the a give the illusion spaced items */
    float:none;
}
#nav ul a{
    white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */
}
#nav li:hover ul{ /* Display the dropdown on hover */
    left:0; /* Bring back on-screen when needed */
}
#nav ul a{
    white-space:nowrap; /* Stop text wrapping and creating multi-line dropdown items */
}
#nav li:hover ul{ /* Display the dropdown on hover */
    left:0; /* Bring back on-screen when needed */
}
#nav li:hover a{ /* These create persistent hover states, meaning the top-most link stays 'hovered' even when your cursor has moved down the list. */
    background:#ffffff;
    text-decoration:none;
}
#nav li:hover ul a{ /* The persistent hover state does however create a global style for links even before they're hovered. Here we undo these effects. */
    text-decoration:none;
}
#nav li:hover ul li a:hover{ /* Here we define the most explicit hover states--what happens when you hover each individual link. */
    background:#fff;
}

Below is the Coding
Code:

<code><ul id="nav">
    <li>
        <a href="http://www.designerssociety.net/">Home</a>
    </li>

    <li>
        <a href="http://www.designerssociety.net/h2-how-to-

design">Design</a>
        <ul>
            <li><a href="http://www.designerssociety.net/h2-how-to-

design">Design Studio</a></li>

            <li><a href="http://www.designerssociety.net/h3-download-

content">Downloads</a></li>
        </ul>
    </li>
    <li>
        <a href="http://www.designerssociety.net/forum">Society</a>

        <ul>
            <li><a

href="http://www.designerssociety.net/gallery/index.htm">Gallery</a></li>
            <li><a

href="http://www.designerssociety.net/forum">Forums</a></li>
            <li><a href="http://www.designerssociety.net/h7-

contest">Contests</a></li>
            <li><a

href="http://www.designerssociety.net/memberlist">Members</a></li>
        </ul>

    </li>
    <li>
        <a href="">Agency</a>
        <ul>
            <li><a href="">Aprentice(Coming Soon)</a></li>
            <li><a href="">Jobs(Coming Soon)</a></li>
            <li><a href="">Advertising(Coming Soon)</a></li>
          <li><a href="http://www.designerssociety.net/h1-rank">Points &

Awards</a></li>
        </ul>
    </li>
    <li>
        <a href="http://www.designerssociety.net/profile?

mode=editprofile">Myself</a>

        <ul>
            <li><a href="http://www.designerssociety.net/profile?

mode=editprofile">Profile</a></li>
            <li><a href="http://www.designerssociety.net/privmsg?

folder=inbox">Messages</a></li>

        </ul>
    </li>
</ul></code>


Last edited by Sir Chivas™ on April 15th 2013, 10:54 pm; edited 3 times in total (Reason for editing : Added [code] tags.)
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ April 15th 2013, 10:53 pm

Hi,

Has this been added somewhere in the forum? This is the forum you're speaking of?
http://designerssociety.betaboard.net/
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety April 15th 2013, 11:07 pm

I haven't added it yet since it doesn't fully work yet but that is where it is going to go.
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ April 15th 2013, 11:17 pm

Ah, I see well the HTML will go inside the templates, also there's a bit more missing since you want it to work on guests and logged in users. Unfortunately, I don't have the sufficient time to do this right now, but I'll try my best to start gathering the codes needed. Very Happy
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety April 16th 2013, 12:40 am

Okay thank you, if you can that is great otherwise I have another idea for my menu that I might do instead.
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ April 16th 2013, 12:42 am

Can you decide on which one you're willing to work with? I don't want to create a code which will not be used afterall.
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety April 16th 2013, 7:03 am

Yeah it's fine sorry for your time I thought of another way afterwards which works. Thanks for the quick responses though!
DesignersSociety
DesignersSociety
Forumember

Female Posts : 146
Reputation : 3
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sanket April 16th 2013, 10:41 am

Since no real solution provided, Thread Garbaged.
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum