Dropdown Menu
3 posters
Page 1 of 1
Dropdown Menu
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
Below is the Coding
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.)
Re: Dropdown Menu
Hi,
Has this been added somewhere in the forum? This is the forum you're speaking of?
http://designerssociety.betaboard.net/
Has this been added somewhere in the forum? This is the forum you're speaking of?
http://designerssociety.betaboard.net/
Sir Chivas™- Helper
- Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||
Re: Dropdown Menu
I haven't added it yet since it doesn't fully work yet but that is where it is going to go.
Re: Dropdown Menu
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.
Sir Chivas™- Helper
- Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||
Re: Dropdown Menu
Okay thank you, if you can that is great otherwise I have another idea for my menu that I might do instead.
Re: Dropdown Menu
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™- Helper
- Posts : 6963
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||
Re: Dropdown Menu
Yeah it's fine sorry for your time I thought of another way afterwards which works. Thanks for the quick responses though!
Re: Dropdown Menu
Since no real solution provided, Thread Garbaged.
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Similar topics
» Dropdown Menu
» Can I get this dropdown menu?
» CSS Dropdown Menu
» dropdown menu on banner
» Dropdown menu in navigation bar
» Can I get this dropdown menu?
» CSS Dropdown Menu
» dropdown menu on banner
» Dropdown menu in navigation bar
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum