vForums Support > Programming & Coding :: Database of Codes/Hacks/Mods :: > Menu Buttons Inside Banner

Menu Buttons Inside Banner - Posted By Danny (schnooble) on 2nd Jan 08 at 4:42am
Global Header

Puts the menu buttons inside your banner and removes the menu cell.

Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*Menu Buttons Inside Banner by Danny*/
  4.  
  5. var xPos = '0'; // X Postion
  6. var yPos = '0'; // Y Postion
  7. var height = '174'; // Banner Image Height
  8.  
  9. var getID = document.getElementById("welcome_table");
  10. getID.style.height = height;
  11. var getTab = getID.getElementsByTagName('td')[0];
  12. getTab.align = 'left';
  13. getTab.vAlign = 'top';
  14. getTab.style.backgroundImage = 'url('+getTab.getElementsByTagName("img")[0].src+')';
  15. var getMenu = getID.getElementsByTagName('td')[2];
  16. getTab.innerHTML = '<div style="position: relative; top:'+yPos+'; left:'+xPos+';">'+getMenu.innerHTML+'</div>';
  17. getMenu.parentNode.parentNode.parentNode.parentNode.parentNode.style.display ='none';
  18.  
  19. //-->
  20. </script>
 

Re: Menu Buttons Inside Banner - Posted By Dreg[Bot] (dregondrahl) on 2nd Jan 08 at 5:09pm
why not just use CSS?


#welcome_table .menu font {
     position: absolute;
     top: 0;
     left: 100px;
}

Re: Menu Buttons Inside Banner - Posted By Danny (schnooble) on 2nd Jan 08 at 5:39pm
I had a feeling youd post that. {Unsure}

Re: Menu Buttons Inside Banner - Posted By Dreg[Bot] (dregondrahl) on 2nd Jan 08 at 6:22pm
Its just an alternative, no worries {Tongue Out}

Re: Menu Buttons Inside Banner - Posted By Danny (schnooble) on 4th Jan 08 at 7:38pm
wouldnt that mess up on people with different resolutions ?

Re: Menu Buttons Inside Banner - Posted By Reverse Blade (zohvi) on 5th Jan 08 at 6:37am
Not if you use percent. (50%)

Re: Menu Buttons Inside Banner - Posted By RuhRoe (mezorro) on 4th Dec 08 at 3:20am
Is there anyway to tell it to center on the X axis on Css? (The Main one won't work with my text codes {Cry} )