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.

How to add a nested menu in a specific place... (more inside)

View previous topic View next topic Go down

How to add a nested menu in a specific place... (more inside)

Post by Mio-chan on April 16th 2012, 6:01 pm

I'm working on designing a new forum design and I'd like to add a nested menu to my website @ http://psjjjj.forum-pro.co.uk/

The nested menu I'm using is:
http://www.dynamicdrive.com/style/csslibrary/item/nested_side_bar_menu/

I already have the CSS and Javascript hosted, I just need a place to put the HTML where it won't distburb other elements, as it would push other elements such as the navbar down, so even if I use padding-top etc, it'll still bring those elements down along with it.

Where I want to place it is (the red box):




Thanks in advance!

Mio-chan
Forumember

Male Posts : 284
Reputation : 16
Language : English, Portuguese | CSS3, HTML and learning C++
Location : Rhode Island, United States of America

http://www.theolympiansclan.com

Back to top Go down

Re: How to add a nested menu in a specific place... (more inside)

Post by Guest on April 16th 2012, 6:07 pm

Add to CSS Stylesheet:
Code:
.sidebarmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
font: bold 13px Verdana;
width: 180px; /* Main Menu Item widths */
border-bottom: 1px solid #ccc;
}
 
.sidebarmenu ul li{
position: relative;
}

/* Top level menu links style */
.sidebarmenu ul li a{
display: block;
overflow: auto; /*force hasLayout in IE7 */
color: white;
text-decoration: none;
padding: 6px;
border-bottom: 1px solid #778;
border-right: 1px solid #778;
}

.sidebarmenu ul li a:link, .sidebarmenu ul li a:visited, .sidebarmenu ul li a:active{
background-color: #012D58; /*background of tabs (default state)*/
}

.sidebarmenu ul li a:visited{
color: white;
}

.sidebarmenu ul li a:hover{
background-color: black;
}

/*Sub level menu items */
.sidebarmenu ul li ul{
position: absolute;
width: 170px; /*Sub Menu Items width */
top: 0;
visibility: hidden;
}

.sidebarmenu a.subfolderstyle{
background: url(right.gif) no-repeat 97% 50%;
}

div.sidebarmenu{
position: absolute !important;
top: 100px;
left: 250px;
}

/* Holly Hack for IE \*/
* html .sidebarmenu ul li { float: left; height: 1%; }
* html .sidebarmenu ul li a { height: 1%; }
/* End */

Add then, in Announcements:
Code:
<div class="sidebarmenu">
<ul id="sidebarmenu1">
<li><a href="#">Item 1</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#">Folder 1</a>
  <ul>
  <li><a href="#">Sub Item 1.1</a></li>
  <li><a href="#">Sub Item 1.2</a></li>
  </ul>
</li>
<li><a href="#">Item 3</a></li>

<li><a href="#">Folder 2</a>
  <ul>
  <li><a href="#">Sub Item 2.1</a></li>
  <li><a href="#">Folder 2.1</a>
    <ul>
    <li><a href="#">Sub Item 2.1.1</a></li>
    <li><a href="#">Sub Item 2.1.2</a></li>
    <li><a href="#">Sub Item 2.1.3</a></li>
    <li><a href="#">Sub Item 2.1.4</a></li>
    </ul>
  </li>
</ul>
</li>
<li><a href="#">Item 4</a></li>
</ul>
</div>
Activate these, and add a new one. Add.

You have now, to custize your menu names and link from HTML code. & From CSS codes, to edit these values:
Code:
top: 100px;
left: 250px;

Guest
Guest


Back to top Go down

Re: How to add a nested menu in a specific place... (more inside)

Post by Mio-chan on April 16th 2012, 6:52 pm

Thank you! Everything is working except the nested sub-menus (the folders)...

Thanks in advance,
Edit: Also, the positioning isn't consistent with different screen resolutions.

Mio-chan
Forumember

Male Posts : 284
Reputation : 16
Language : English, Portuguese | CSS3, HTML and learning C++
Location : Rhode Island, United States of America

http://www.theolympiansclan.com

Back to top Go down

Re: How to add a nested menu in a specific place... (more inside)

Post by LGforum on April 16th 2012, 8:28 pm

To keep it consisten your gonna have to do some box math with percentages.

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.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