The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Dropdown Menu

View previous topic View next topic Go down

In progress Dropdown Menu

Post by DesignersSociety on 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
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ on 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/



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

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

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety on 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
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ on 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



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

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

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety on 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
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

Post by Sir Chivas™ on 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.



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

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

Back to top Go down

In progress Re: Dropdown Menu

Post by DesignersSociety on 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
Forumember

Female Posts : 120
Reputation : 2
Language : english

http://designerssociety.betaboard.net

Back to top Go down

In progress Re: Dropdown Menu

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

Since no real solution provided, Thread Garbaged.

Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


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