Choose from our various pricing plans. There is a package for everyone!


Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Page 1 of 2 1, 2  Next

View previous topic View next topic Go down

Tutorial Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Sat Jun 30, 2012 8:41 pm

Sexy Drop Down Menu with jQuery and CSS

See Source
Author: Soh Tanaka

Navigation Menu is one of the most important thing on your forum.

In this tutorial you will learn how to create a beautiful and professional Drop Down Menu. We will create this effect using jQuery. You need to edit templates;

The HTML code is very simple. You just need a list of links. If it has a sub-menu, it should have another list inside. Your HTML code should be like this below:

Step 1: The HTML code:

Administration Panel => Display => Templates => General Edit template overall_header Find this code:

Code:

<div id="pun-navlinks">
        <ul class="clearfix">
      <li>{GENERATED_NAV_BAR}</li>
  </ul>
</div>

And replace with this:
Code:

<ul class="topnav">
            <li><a href="#">Home</a></li>
            <li>
                <a href="#">Tutorials</a>

                <ul class="subnav">
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>

                </ul>
            </li>
            <li>
                <a href="#">Resources</a>
                <ul class="subnav">
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>

                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                    <li><a href="#">Sub Nav Link</a></li>
                </ul>
            </li>
            <li><a href="#">About Us</a></li>

            <li><a href="#">Advertise</a></li>
            <li><a href="#">Submit</a></li>
            <li><a href="#">Contact Us</a></li>

            <li>
                <a href="#">More</a>
                <ul class="subnav">
                    <li><a href="#">Follow Us on Twitter</a></li>
                    <li><a href="#">Like Us on Facebook</a></li>
                    <li><a href="#">Subscribe on Youtube</a></li>
                </ul>
            </li>

        </ul>  

Hit save and click publish

Step 2: The CSS code:
Administration Panel => Display => Colors => CSS Stylesheet Paste the following to the bottom of your CSS and then click Submit:

Code:
ul.topnav {
 list-style: none;
 padding: 0 20px;
margin: 0;
 float: left;
 width: 920px;
 background: #222;
 font-size: 1.2em;
 background: url(http://i43.servimg.com/u/f43/14/73/12/96/topnav10.gif) repeat-x;
}
ul.topnav li {
 float: left;
 margin: 0;
padding: 0 15px 0 0;
 position: relative; /*--Declare X and Y axis base--*/
}
ul.topnav li a{
 padding: 10px 5px;
 color: #fff;
 display: block;
 text-decoration: none;
 float: left;
}
ul.topnav li a:hover{
 background: url(http://i43.servimg.com/u/f43/14/73/12/96/topnav11.gif) no-repeat center top;
}
ul.topnav li span { /*--Drop down trigger styles--*/
 width: 17px;
 height: 35px;
 float: left;
 background: url(http://i43.servimg.com/u/f43/14/73/12/96/subnav10.gif) no-repeat center top;
}
ul.topnav li span.subhover {background-position: center bottom; cursor: pointer;}

/*--Hover effect for trigger--*/
ul.topnav li ul.subnav {
 list-style: none;
 position: absolute;
 left: 0; top: 35px;
 background: #333;
 margin: 0; padding: 0;
 display: none;
 float: left;
 width: 170px;
 -webkit-border-bottom-right-radius: 05px;
 -webkit-border-bottom-left-radius: 5px;
 -moz-border-radius-bottomright: 05px;
 -moz-border-radius-bottomleft: 5px;
 border-bottom-right-radius: 05px;
 border-bottom-left-radius: 5px;
 border: 1px solid #111;
}
ul.topnav li ul.subnav li{
 margin: 0; padding: 0;
 border-top: 1px solid #252525;
border-bottom: 1px solid #444;
clear: both;
 width: 170px;
 -webkit-border-bottom-right-radius: 05px;
 -webkit-border-bottom-left-radius: 5px;
 -moz-border-radius-bottomright: 05px;
 -moz-border-radius-bottomleft: 5px;
 border-bottom-right-radius: 05px;
 border-bottom-left-radius: 5px;
}
html ul.topnav li ul.subnav li a {
 float: left;
 width: 145px;
 background: #333 url(http://i43.servimg.com/u/f43/14/73/12/96/dropdo10.gif) no-repeat 10px center;
 padding-left: 20px;
}
html ul.topnav li ul.subnav li a:hover { /*--Hover effect for subnav links--*/
 background: #222 url(http://i43.servimg.com/u/f43/14/73/12/96/dropdo10.gif) no-repeat 10px center;
}

Step 3: The jQuery code:
Put this link in the template overall_header where other script are below head tag.
Code:

<script type="text/javascript" src="http://near-reality123123123.webs.com/bar.js"></script>


If you have any problems be sure to post them and I will get back to you A.S.A.P.


Last edited by Mati™ on Sat Nov 15, 2014 1:56 am; edited 2 times in total
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Shadow on Sat Jun 30, 2012 10:20 pm

Awesome mate.
avatar
Shadow
Premium Member


Posts : 30
Join date : 2012-04-25
Reputation : 0

View user profile

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Zilla on Sun Jul 01, 2012 4:42 am

Excellent tutorial!
avatar
Zilla
Premium Member


Age : 21
Posts : 166
Join date : 2012-05-03
Reputation : 13

View user profile

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Th1nK on Sun Jul 01, 2012 7:05 am

Matti, I want to create HTML page and wanna use this navbar. Can you create one HTML page only with this navbar, I will add containers, tags and etc?
PS:
Can I use your demo code HTML to create HTML Page for me?
avatar
Th1nK
Administrator
Administrator

Posts : 468
Join date : 2012-04-06
Reputation : 43

View user profile http://www.csshelp.net

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by L! on Mon Jul 09, 2012 1:46 pm

Great tutorial my friend!


Want to make money online? PM Me! Wink

avatar
L!
Premium Member


Age : 19
Posts : 105
Join date : 2012-07-05
Reputation : 5

View user profile http://www.ldevelopment.org/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Eclipse on Tue Jul 24, 2012 8:26 pm

can i see a ss of what it looks like?




avatar
Eclipse
Premium Member


Age : 19
Posts : 212
Join date : 2012-07-23
Forum Version : PunBB
Reputation : 3

View user profile http://discussionhq.com/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Tue Jul 24, 2012 8:44 pm

Have you seen the demo? => http://www.csshelp.net/h17-sexy-drop-down-menu-jquery-css
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by RSguideMaker on Tue Jul 24, 2012 9:59 pm

That is epic. Love it man. Is it possible to just use this in a plain HTML website page?



Please do not request help via PM! Post on the forums where it can help everyone.
avatar
RSguideMaker
Support Moderator
Support Moderator

Age : 18
Posts : 421
Join date : 2012-05-23
Reputation : 9

View user profile http://euanfitzpatrick.co.nf/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Tue Jul 24, 2012 10:06 pm

You can use the HTML and CSS but it wont show the drop down.

But if you want we can make a drop down menu with CSS and HTML only.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Eclipse on Tue Jul 24, 2012 11:06 pm

thats cool, but i dont understand step 3, a little help?




avatar
Eclipse
Premium Member


Age : 19
Posts : 212
Join date : 2012-07-23
Forum Version : PunBB
Reputation : 3

View user profile http://discussionhq.com/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Tue Jul 24, 2012 11:11 pm

Put that in the template overall_header below head tag.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Eclipse on Tue Jul 24, 2012 11:12 pm

'where other script are below head tag."

head tag?




avatar
Eclipse
Premium Member


Age : 19
Posts : 212
Join date : 2012-07-23
Forum Version : PunBB
Reputation : 3

View user profile http://discussionhq.com/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Tue Jul 24, 2012 11:14 pm

just put it anywhere below this
Code:
<head>
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Eclipse on Tue Jul 24, 2012 11:23 pm

and where do i put the links and names of them?

edit: this is how my forum looks like: http://i48.servimg.com/u/f48/17/08/32/12/screen22.png
avatar
Eclipse
Premium Member


Age : 19
Posts : 212
Join date : 2012-07-23
Forum Version : PunBB
Reputation : 3

View user profile http://discussionhq.com/

Back to top Go down

Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

Post by Mati™ on Tue Jul 24, 2012 11:28 pm

Lol, easy you see them "#" there you put the links.

Ex:
Code:
<li><a href="http://www.csshelp.net/">Forum</a></li>

Result:
  • Forum
  • avatar
    Mati™
    Administrator
    Administrator

    Age : 31
    Posts : 2112
    Join date : 2011-10-20
    Forum Version : PhpBB3
    Reputation : 147

    View user profile http://fmfocus.forumotion.net/forum

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Eclipse on Tue Jul 24, 2012 11:30 pm

    Yes, but they dont appear like they did in the demo




    avatar
    Eclipse
    Premium Member


    Age : 19
    Posts : 212
    Join date : 2012-07-23
    Forum Version : PunBB
    Reputation : 3

    View user profile http://discussionhq.com/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Mati™ on Tue Jul 24, 2012 11:31 pm

    HyperActive wrote:and where do i put the links and names of them?

    edit: this is how my forum looks like: http://i48.servimg.com/u/f48/17/08/32/12/screen22.png

    Can you PM me details of your account which has admin access? I would like to check.
    avatar
    Mati™
    Administrator
    Administrator

    Age : 31
    Posts : 2112
    Join date : 2011-10-20
    Forum Version : PhpBB3
    Reputation : 147

    View user profile http://fmfocus.forumotion.net/forum

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Eclipse on Tue Jul 24, 2012 11:36 pm

    i pmed you the info, i dont know whats correct, but could i just fill out the code here, and you put it in? would be easy so i dont screw up again




    avatar
    Eclipse
    Premium Member


    Age : 19
    Posts : 212
    Join date : 2012-07-23
    Forum Version : PunBB
    Reputation : 3

    View user profile http://discussionhq.com/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Eclipse on Wed Jul 25, 2012 12:17 am

    When i tried to remove it, this happened

    http://i48.servimg.com/u/f48/17/08/32/12/screen23.png

    it created another nav bar, in white, under it

    EDIT: Fixed
    avatar
    Eclipse
    Premium Member


    Age : 19
    Posts : 212
    Join date : 2012-07-23
    Forum Version : PunBB
    Reputation : 3

    View user profile http://discussionhq.com/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by RSguideMaker on Wed Jul 25, 2012 9:00 am

    Matti wrote:You can use the HTML and CSS but it wont show the drop down.

    But if you want we can make a drop down menu with CSS and HTML only.

    Yes please. When do you reckon it can be done by?
    avatar
    RSguideMaker
    Support Moderator
    Support Moderator

    Age : 18
    Posts : 421
    Join date : 2012-05-23
    Reputation : 9

    View user profile http://euanfitzpatrick.co.nf/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Mati™ on Wed Jul 25, 2012 11:39 am

    Very soon. Smile
    avatar
    Mati™
    Administrator
    Administrator

    Age : 31
    Posts : 2112
    Join date : 2011-10-20
    Forum Version : PhpBB3
    Reputation : 147

    View user profile http://fmfocus.forumotion.net/forum

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by RSguideMaker on Wed Jul 25, 2012 8:41 pm

    Could you pm me with the HTML/CSS when it's done please?

    EDIT: Never mind. I sorted it. I forgot to check the tutorials section.
    avatar
    RSguideMaker
    Support Moderator
    Support Moderator

    Age : 18
    Posts : 421
    Join date : 2012-05-23
    Reputation : 9

    View user profile http://euanfitzpatrick.co.nf/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by DarkWrld9 on Wed Aug 01, 2012 5:03 pm

    How do you center the Text, that way it can all be center in the bar. Rather then being on the left.


    Also, I don't get the dropdown/ Sad
    avatar
    DarkWrld9
    Member
    Member

    Age : 22
    Posts : 12
    Join date : 2012-05-22
    Reputation : 3

    View user profile

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by MarkoNinic1994 on Tue Sep 11, 2012 2:54 pm

    Hey guys is it possible that this code isn't in templates


    I have searched all in overal_header and there isn't such a thing,btw i'm using phpBB2
    avatar
    MarkoNinic1994
    Member
    Member

    Age : 22
    Posts : 10
    Join date : 2012-09-11
    Reputation : 0

    View user profile http://anroidnewbies.danskforum.net/

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Th1nK on Tue Sep 11, 2012 3:11 pm

    MarkoNinic1994 paste your template here!
    avatar
    Th1nK
    Administrator
    Administrator

    Posts : 468
    Join date : 2012-04-06
    Reputation : 43

    View user profile http://www.csshelp.net

    Back to top Go down

    Tutorial Re: Sexy Drop Down Menu with jQuery & CSS - (PunBB and PhpBB2)

    Post by Sponsored content


    Sponsored content


    Back to top Go down

    Page 1 of 2 1, 2  Next

    View previous topic View next topic Back to top


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