WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You

WebArtz - The Web Design Forum
Welcome to WebArtz, Guest!

WebArtz is a nice place for discussions related to web designing and coding. We help our members to code their own website templates with HTML and CSS. We give them advice on various issues.

To know more about WebArtz Forum, visit the About Us page.

At the moment, you are viewing the forum as a guest. As a guest you can't make post and participate in discussions. You need to register and become a member of the forum. Click the register link below and become a part of this forum.

Thank You


You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

1How to add sub menu item in my menu bar? Empty How to add sub menu item in my menu bar? Mon Aug 05, 2013 2:06 pm

alen


Registered Member
Registered Member
Hello Friends,
I want to create a menu bar in which have some sub menu item. Tell me how to i create.

Nanotechnology

Nanotechnology
Registered Member
Registered Member
This is a normal menu with no sub menu:
Code:

<ul>
    <li><a href='#'>home</a></li>
    <li><a href='#'>about</a></li>
</ul>

To create a sub-level menu, you need to do this:
Code:

<ul>
    <li><a href='#'>home</a></li>
    <li><a href='#'>about</a>
          <ul>
              <li><a href='#'>our history</a></li>
              <li><a href='#'>mission statement</a></li>
          </ul>
    </li>

You basically create another unordered list but you need to create it within the list-item where you want the drop down to appear.

You will have some work to style it how you want.

Regards,

NT.

http://www.tspv-websites.co.uk

alen


Registered Member
Registered Member
Thanks Nanotechnology

Peter Michael


Registered Member
Registered Member
/* submenu positioning*/
.nav ul {
position: absolute;
white-space: nowrap;
border-bottom: 5px solid orange;
z-index: 1;
left: -99999em;
}
.nav > li:hover > ul {
left: auto;
margin-top: 5px;
min-width: 100%;
}
.nav > li li:hover > ul {
left: 100%;
margin-left: 1px;
top: -1px;
}
/* arrow hover styling */
.nav > li > a:first-child:nth-last-child(2):before {
border-top-color: #aaa;
}
.nav > li:hover > a:first-child:nth-last-child(2):before {
border: 5px solid transparent;
border-bottom-color: orange;
margin-top:-5px
}
.nav li li > a:first-child:nth-last-child(2):before {
border-left-color: #aaa;
margin-top: -5px
}
.nav li li:hover > a:first-child:nth-last-child(2):before {
border: 5px solid transparent;
border-right-color: orange;
right: 10px;
}

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

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