SMF For Free Support Forum
Signup For Free Forum
October 15, 2008, 05:10:32 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Code] Scroll over menu bar  (Read 328 times)
0 Members and 1 Guest are viewing this topic.
mattmilla1
SMF For Free Member
*
Offline Offline

Posts: 52


crazydog10


View Profile WWW
« on: June 16, 2008, 08:57:35 pm »

Preview: http://mattmilla1.smfforfree4.com

Insert this into you headers:


To chang the color put this in and change the code around:
Code:
<style>
<!--
#slidemenubar, #slidemenubar2{
position:absolute;
border:1.5px solid black;
background-color:#666666;
layer-background-color:#000000;
font:bold 12px Verdana;
line-height:20px;
}
-->
</style>
----------------------------------------------------------------------------------------------------------------------------
Code:
<script language="JavaScript1.2">

/***********************************************
* Sliding Menu Bar Script- © Dynamic Drive (www.dynamicdrive.com)
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
***********************************************/

var slidemenu_width='160px' //specify width of menu (in pixels)
var slidemenu_reveal='12px' //specify amount that menu should protrude initially
var slidemenu_top='170px'   //specify vertical offset of menu on page

var ns4=document.layers?1:0
var ie4=document.all
var ns6=document.getElementById&&!document.all?1:0

if (ie4||ns6)
document.write('<div id="slidemenubar2" style="left:'+((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)+'px; top:'+slidemenu_top+'; width:'+slidemenu_width+'" onMouseover="pull()" onMouseout="draw()">')
else if (ns4){
document.write('<style>n#slidemenubar{nwidth:'+slidemenu_width+';}n</style>n')
document.write('<layer id="slidemenubar" left=0 top='+slidemenu_top+' width='+slidemenu_width+' onMouseover="pull()" onMouseout="draw()" visibility=hide>')
}

var sitems=new Array()

///////////Edit below/////////////////////////////////

//siteitems[x]=["Item Text", "Optional URL associated with text"]

sitems[0]= ["<big><font face='Arial'>=CP= Menu</font></big>", ""]
sitems[1]= [ "Forums", "http://mattmilla1.smfforfree4.com/index.php?action=forum"]
sitems[2]= [ "Help", "http://mattmilla1.smfforfree4.com/index.php?action=help"]
sitems[3]= [ "BF: Company of Heroes", "http://www.badcompany.ea.com"]
sitems[4]= [ "PR Mod", "http://www.reality-mod.com"]
sitems[5]= [ "SMF SUPPORT", "http://www.smfforfree.com"]
sitems[6]= [ "Dynamic Codes", "http://www.dynamicdrive.com"]

//If you want the links to load in another frame/window, specify name of target (ie: target="_new")
var target=""

/////////////////////////////////////////////////////////

if (ie4||ns4||ns6){
for (i=0;i<sitems.length;i++){
if (sitems[i][1])
document.write('<a href="'+sitems[i][1]+'" target="'+target+'">')
document.write(sitems[i][0])
if (sitems[i][1])
document.write('</a>')
document.write('<br>n')
}
}

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (ns4){
document.slidemenubar.left=((parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1)
document.slidemenubar.visibility="show"
setTimeout("window.onresize=regenerate",400)
}
}
window.onload=regenerate2

rightboundary=0
leftboundary=(parseInt(slidemenu_width)-parseInt(slidemenu_reveal))*-1

if (ie4||ns6){
document.write('</div>')
themenu=(ns6)? document.getElementById("slidemenubar2").style : document.all.slidemenubar2.style
}
else if (ns4){
document.write('</layer>')
themenu=document.layers.slidemenubar
}

function pull(){
if (window.drawit)
clearInterval(drawit)
pullit=setInterval("pullengine()",10)
}
function draw(){
clearInterval(pullit)
drawit=setInterval("drawengine()",10)
}
function pullengine(){
if ((ie4||ns6)&&parseInt(themenu.left)<rightboundary)
themenu.left=parseInt(themenu.left)+10+"px"
else if(ns4&&themenu.left<rightboundary)
themenu.left+=10
else if (window.pullit){
themenu.left=0
clearInterval(pullit)
}
}

function drawengine(){
if ((ie4||ns6)&&parseInt(themenu.left)>leftboundary)
themenu.left=parseInt(themenu.left)-10+"px"
else if(ns4&&themenu.left>leftboundary)
themenu.left-=10
else if (window.drawit){
themenu.left=leftboundary
clearInterval(drawit)
}
}
</script>

« Last Edit: June 27, 2008, 03:21:23 pm by simply sibyl » Logged

<CRAZYDOG10>
     
=crazydog10=
<br />
=That cat is a bigfoot bounty hunter lol=
Supernovadelta
SMF For Free Full Member
*
Offline Offline

Posts: 105


Supernovadelta Productions.


View Profile WWW
« Reply #1 on: June 17, 2008, 07:21:17 am »

Thanks for the code,needed it on my new site.
Logged

mattmilla1
SMF For Free Member
*
Offline Offline

Posts: 52


crazydog10


View Profile WWW
« Reply #2 on: June 17, 2008, 09:35:37 am »

any time.....by the way...if you want to make an image instead of a BG color just add this....

Code:
Background-image: url();

put the url of the image in the quotation marks!!

Replace that with the
Code:
<style>
<!--
#slidemenubar, #slidemenubar2{
position:absolute;
border:1.5px solid black;
background-color:#666666;   <=Put that code inplace of this line!!!! But delete this sentence!!
layer-background-color:#000000;
font:bold 12px Verdana;
line-height:20px;
}
-->
</style>
Logged

<CRAZYDOG10>
     
=crazydog10=
<br />
=That cat is a bigfoot bounty hunter lol=


Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC
ServerBeach Coupon
Page created in 0.183 seconds with 16 queries.