|
Post by Streamstrider on Nov 4, 2011 18:20:47 GMT -8
|
|
NetMaster
Code Helper
"Get caught in my web!"
Posts: 305
NetMaster said 0 great things
|
Post by NetMaster on Nov 4, 2011 18:21:56 GMT -8
Okay it doesn't like something about the way it gets called by the script. Wormo is probably gonna have to help you on that. All I know is in the test I just ran I used the original configuration and it worked. I then replaced just the javascript coding and took out the body onload function. That screwed it up and it didn't work. I tried putting the function below the addFunction but that didn't work either. I'm thinking its a syntax error but have no clue where that error might be.
|
|
|
Post by Wormopolis on Nov 4, 2011 19:56:41 GMT -8
<style type="text/css"> <!-- * {margin:0; padding:0} .sm {list-style:none; width:459px; height:100px; display:block; overflow:hidden} .sm li {float:left; display:inline; overflow:hidden} --> </style> <ul id="sm" class="sm"> <li><img src="http://i278.photobucket.com/albums/kk119/Streamstrider182/Avatars/Untitled-23.gif" alt="" /></li> <li><img src="http://i278.photobucket.com/albums/kk119/Streamstrider182/Avatars/Untitled-23.gif" alt="" /></li> <li><img src="http://i278.photobucket.com/albums/kk119/Streamstrider182/Avatars/Untitled-23.gif" alt="" /></li> </ul>
<script type="text/javascript"> <!-- var slideMenu=function(){ var sp,st,t,m,sa,l,w,sw,ot; return{ build:function(sm,sw,mt,s,sl,h){ sp=s; st=sw; t=mt; m=document.getElementById(sm); sa=m.getElementsByTagName('li'); l=sa.length; w=m.offsetWidth; sw=w/l; ot=Math.floor((w-st)/(l-1)); var i=0; for(i;i<l;i++){s=sa[i]; s.style.width=sw+'px'; this.timer(s)} if(sl!=null){m.timer=setInterval(function(){slideMenu.slide(sa[sl-1])},t)} }, timer:function(s){s.onmouseover=function(){clearInterval(m.timer);m.timer=setInterval(function(){slideMenu.slide(s)},t)} }, slide:function(s){ var cw=parseInt(s.style.width); if(cw<st){ var owt=0; var i=0; for(i;i<l;i++){ if(sa[i]!=s){ var o,ow; var oi=0; o=sa[i]; ow=parseInt(o.style.width); if(ow>ot){oi=Math.floor((ow-ot)/sp); oi=(oi>0)?oi:1; o.style.width=(ow-oi)+'px'} owt=owt+(ow-oi)}} s.style.width=(w-owt)+'px'; }else{clearInterval(m.timer)} } }; }(); function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(slideMenu.build('sm',200,10,10,1)); //--> </script>
|
|
|
Post by Streamstrider on Nov 6, 2011 0:47:43 GMT -8
Well, at least it didn't remove all my links this time. XD But it did move my forum all the way to the left (pretty much removing whatever space there was).
|
|
|
Post by Wormopolis on Nov 6, 2011 18:12:17 GMT -8
remove this * {margin:0; padding:0}
|
|
|
Post by Streamstrider on Nov 7, 2011 19:55:24 GMT -8
|
|
|
Post by Wormopolis on Nov 7, 2011 22:29:11 GMT -8
the width isnt enough. increase the width
|
|
|
Post by Streamstrider on Nov 8, 2011 4:58:53 GMT -8
No change, except that it doesn't slide anymore. XD
|
|
|
Post by Wormopolis on Nov 8, 2011 18:57:09 GMT -8
alright.. put it back I guess. this might be beyond me.
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 9, 2011 23:52:21 GMT -8
Try putting a div around the unordered list with the width set to the width of your forum and then set an inline style of text-align: center; and see if that works? Edit - I seem to have got this almost working perfectly: shadowsofthecreed.proboards.com/index.cgiDo you want me to post the edits I made to the code? I only need help getting the text to show at the top next to the image not below the image
|
|
|
Post by Streamstrider on Nov 10, 2011 2:40:22 GMT -8
I'd like to see the edits, if you don't mind. XD I'm sure Wormo would as well.
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 10, 2011 9:12:30 GMT -8
That's fine ^_^
<style type="text/css"> <!-- #sm {margin: -1px; padding: 2px;} .sm {list-style:none; width:750px; height:120px; display:block; overflow:hidden} .sm li {float:left; display:inline; overflow:hidden} --> </style> <div width="750px" style="text-align:center; height: 200px;"><table><tr><td class="catbg" cellPadding="3px">Your Staff</td></tr> <tr><td><ul id="sm" class="sm" style="height="150px"> <li class="sm"><img src="http://i1104.photobucket.com/albums/h328/shophostingbbne/534ed3b4.png" alt="" /> <b>Badr al-Miraj</b><br> Administrator<br><br>Badr al-Miraj is the main admin and founder of this site. There is numerous sites created by the person behind the alias however this site has become her brain child</li> <li><img src="http://i993.photobucket.com/albums/af51/MaryEvereska/Assassins%20Creed%20SP/ezio1o.jpg" alt="" />Currently this staff position is untaken, and as thus there is absolutely no information to put about this member of staff. However please note that this staff member is a highly valued member of the community, or will be when we get one. Please check back frequently for updates</li> <li><img src="http://i993.photobucket.com/albums/af51/MaryEvereska/Assassins%20Creed%20SP/ezio1o.jpg" alt="" />Currently this staff position is untaken, and as thus there is absolutely no information to put about this member of staff. However please note that this staff member is a highly valued member of the community, or will be when we get one. Please check back frequently for updates</li> <li><img src="http://i993.photobucket.com/albums/af51/MaryEvereska/Assassins%20Creed%20SP/ezio1o.jpg" alt="" /> Currently this staff position is untaken, and as thus there is absolutely no information to put about this member of staff. However please note that this staff member is a highly valued member of the community, or will be when we get one. Please check back frequently for updates</li> <li><img src="http://i993.photobucket.com/albums/af51/MaryEvereska/Assassins%20Creed%20SP/ezio1o.jpg" alt="" /> Currently this staff position is untaken, and as thus there is absolutely no information to put about this member of staff. However please note that this staff member is a highly valued member of the community, or will be when we get one. Please check back frequently for updates</li> </ul></td></tr></table> </div>
<script type="text/javascript"> <!-- var slideMenu=function(){ var sp,st,t,m,sa,l,w,sw,ot; return{ build:function(sm,sw,mt,s,sl,h){ sp=s; st=sw; t=mt; m=document.getElementById(sm); sa=m.getElementsByTagName('li'); l=sa.length; w=m.offsetWidth; sw=w/l; ot=Math.floor((w-st)/(l-1)); var i=0; for(i;i<l;i++){s=sa[i]; s.style.width=sw+'px'; this.timer(s)} if(sl!=null){m.timer=setInterval(function(){slideMenu.slide(sa[sl-1])},t)} }, timer:function(s){s.onmouseover=function(){clearInterval(m.timer);m.timer=setInterval(function(){slideMenu.slide(s)},t)} }, slide:function(s){ var cw=parseInt(s.style.width); if(cw<st){ var owt=0; var i=0; for(i;i<l;i++){ if(sa[i]!=s){ var o,ow; var oi=0; o=sa[i]; ow=parseInt(o.style.width); if(ow>ot){oi=Math.floor((ow-ot)/sp); oi=(oi>0)?oi:1; o.style.width=(ow-oi)+'px'} owt=owt+(ow-oi)}} s.style.width=(w-owt)+'px'; }else{clearInterval(m.timer)} } }; }(); function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(slideMenu.build('sm',500,10,4,1)); //--> </script>
The edits were in the css to stop it affecting it squidging against the left side - the * got changed to #sm Then I set a div around the entire stuff to tell it 750px width max Inside this I put a table to give me two rows with a cell each Before finally I edited the addLoadEvent(slideMenu.build('sm',500,10,4,1)); where the first number after the 'sm' was originally 200 to give a set width
|
|
|
Post by Wormopolis on Nov 10, 2011 13:30:23 GMT -8
that is sexy as hell Nats! you have surpassed me. you get the keys to the van and I get to retire and go fishing.
|
|
Rei Kon
Junior Member
Posts: 52
Rei Kon said 0 great things
|
Post by Rei Kon on Nov 10, 2011 14:08:10 GMT -8
xD I only know html and css well, I'm still learning jquery etc, I was sat fiddling with it on my message board xD
|
|
|
Post by Streamstrider on Nov 10, 2011 16:10:50 GMT -8
|
|