6 replies
  • WEB DESIGN
  • |
I bought a template to design my site with...the menu bar includes a rollover css...my problem is that i need to use a drop down menu...to do this do i just get rid of the rollover style sheet all togather?
#needed #rollover
  • Profile picture of the author Richard Whyte
    Well, you can if you want to. If you plan to nuke the roll overs and the only thing in the style sheet is for the rollovers, then you can remove the link to it.

    If you are building a CSS drop down menu, then you will need to ad a new stylesheet for this or ad the code to an existing one.

    I suggest that you just comment out the changes you want to make, this way if you change your mind, you can switch back real easy.

    Also, never, ever work on your original files. Always make a backup copy and use it to make changes to. This way you can alwasy go back if something goes wrong.

    I don't know about you, but I have been a designer for many years and I still make mistakes. The save button is my very best friend.

    Have a Great Day!
    {{ DiscussionBoard.errors[951486].message }}
  • Profile picture of the author Cerberus
    I would contact the site or person who created the file. They can probably customize it for you.
    {{ DiscussionBoard.errors[951487].message }}
  • Profile picture of the author chefjimmy
    I,m fairly new to all this,but this is the rollover code...is there a way to add to it to create the drop down menu?

    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i]; } }
    }

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    {{ DiscussionBoard.errors[951567].message }}
    • Profile picture of the author Amanda_Moon
      Originally Posted by chefjimmy View Post

      I,m fairly new to all this,but this is the rollover code...is there a way to add to it to create the drop down menu?

      function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
      }

      function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i]; } }
      }

      function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
      }

      function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
      if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
      }

      This coding is JavaScript, not CSS .... which are you wanting to run, or a combination of both?
      {{ DiscussionBoard.errors[952242].message }}
      • Profile picture of the author chefjimmy
        I apologize if my understanding of it was incorrect,and my problem has magnified,i originally wanted to convert this to a drop down...but the "java script"has its own folder,and i,m clueless to its operations. So my next thought was to just create links to pages by having pages dedicated to the links with each category.I thought this might work.So i set out to finally place text on the menu buttons....it wasnt lineing up real well in photoshop,so my next idea was to place it as a script in the style sheet.But i am having problems figuring out where to enter the code....it wasnt hard to find the code but knowing where to place it is troubling me.By the way i mean do i put it in the css,the style layout,the rollover,or all the above?
        {{ DiscussionBoard.errors[962520].message }}
  • Profile picture of the author David0022
    Chefjimmy,

    I agree with Cerberus, try contacting the designer of that theme and see if he (or she) will customize it for you. It will might cost you a little cash, but if you get your blog looking the way you want it, then it's probably worth it.

    BTW,
    The code sample above isn't CSS. It's JavaScript (a much more difficult beast to understand than CSS.)

    I hope I could help!
    -David
    {{ DiscussionBoard.errors[952241].message }}

Trending Topics