vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Floating Menu

Floating Menu - Posted By Michael (wrighty) on 27th Apr 08 at 2:47pm
For some reason I decided to code this. It's one of many codes that I'm going to make taking advantage of this 'floating' bar idea.

This will add a menu to the top of the forum that remains there when you scroll down.

<style>
body {
    margin-top: 20px;
}
</style>
<table width="100%" border="0" style="position: fixed; left: 0px; top: -4px">
    <tr>
        <td align="center">
            <table cellspacing="1" cellpadding="3" class="border" border="0" width="95%">
                <tr>
                    <td class="title1" id='new_menu'></td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<script>
/*Floating Menu
Created By Wrighty
Do Not: Rip, Repost or Claim*/
get('new_menu','id').appendChild(get('menu_buttons','id').getElementsByTagName('font')[0]);
get('menu_buttons','id').parentNode.style.display = 'none';
</script>


Global Header

Re: Floating Menu - Posted By dog199200 (dog199200) on 27th Apr 08 at 6:39pm
YOu forgot to add where it goes so for those that see this it should go where you want this effect to apply.

@Wrighty you might want to make it o that the old nav menu still shows and that it registers buttons that you have added with code and have it center all the buttons with the forum because when added it pushed them all to the side, also if anything you could make another version of the code that will allow you to reorder the buttons in anyways and allow you to add new buttons.


Edit: also just wondering, if you aint going to do it, could i give it a shot? i'm asking because well everything i'll need to use to do it is coded by you so its the respectful thing to do.

Re: Floating Menu - Posted By Michael (wrighty) on 27th Apr 08 at 7:02pm
Posted By dog199200 on 27th Apr 08 at 6:39pm
 
YOu forgot to add where it goes so for those that see this it should go where you want this effect to apply.

Added! {Smile} Thanks!

Posted By dog199200 on 27th Apr 08 at 6:39pm
 
@Wrighty you might want to make it o that the old nav menu still shows and that it registers buttons that you have added with code and have it center all the buttons with the forum because when added it pushed them all to the side, also if anything you could make another version of the code that will allow you to reorder the buttons in anyways and allow you to add new buttons.


This code is intended to replace the old nav. The code moves the WHOLE menu. Not just some of the buttons.

It's aligned the same way as the other menu buttons are.


For the last thing, using my 'reorder menu buttons' code before this code will work! {Smile}
Posted By dog199200 on 27th Apr 08 at 6:39pm
 
Edit: also just wondering, if you aint going to do it, could i give it a shot? i'm asking because well everything i'll need to use to do it is coded by you so its the respectful thing to do.


I think everything you wanted to is already working fine in the code?

Re: Floating Menu - Posted By dog199200 (dog199200) on 27th Apr 08 at 7:07pm
not exactly i did mention something about having the code check for buttons added to the nav menu and not removing them, and no the code is buggy, take a look http://deluxeanimeforum.vforums.co.uk/, it doesn;'t contain the same alignment. Also the semi-transparency
makes it look bad while it is scrolling down.

Re: Floating Menu - Posted By Michael (wrighty) on 27th Apr 08 at 7:08pm
make sure all codes that modify the nav bar are placed before this one, then it should be fine! {Smile}

Re: Floating Menu - Posted By dog199200 (dog199200) on 27th Apr 08 at 7:10pm
i edit my post above, also at the same time you need to take into consideration that people do use multiple skins so they may use skin headers, for exanmple for my site i have 2 skins so i have a copy of codes for each skin because how they effect the skin directly, so you migtn wnat to add a comment about that as well, because if they are using mutiple skins headers/footers the code would be buggy and not work with the rest...sorry fr be very technical..

Re: Floating Menu - Posted By Michael (wrighty) on 27th Apr 08 at 7:12pm
Posted By dog199200 on 27th Apr 08 at 7:10pm
 
i edit my post above, also at the same time you need to take into consideration that people do use multiple skins so they may use skin headers, for exanmple for my site i have 2 skins so i have a copy of codes for each skin because how they effect the skin directly, so you migtn wnat to add a comment about that as well, because if they are using mutiple skins headers/footers the code would be buggy and not work with the rest...sorry fr be very technical..


I would expect peopel to add it to the 'skin' global header. Not to the global global header.

Also, as for the transparency, could you be more precise?

Re: Floating Menu - Posted By dog199200 (dog199200) on 27th Apr 08 at 7:15pm
when added hen scrolling down for some reason the boards test over rides the butttons so the buttons cant be seen. Also BTW added buttons to the nav menu dont show up no matter where the code us place, i tested it.

Re: Floating Menu - Posted By Michael (wrighty) on 27th Apr 08 at 7:37pm
I have updated the 'add buttons to menu' code to work with this. Was because of the way I was adding the button.