WordPress.org

Forums

Javascript In Sidebar throws out site (2 posts)

  1. Nerz
    Member
    Posted 8 years ago #

    Im trying to put a simple javascript in the sidebar of my site

    <h2>Hot Topics</h2>
    <div class="mylot"><p>
    <script language=javascript>
    ml_sid="Nerz32";
    ml_width=150;
    ml_backcolor="#FFFFFF";
    ml_forcolor="#888888";
    ml_linkcolor="#888888";
    ml_borderwidth=0;
    ml_bordercolor="#FFFFFF";
    ml_keyword="making money online";
    ml_numresults=1;
    ml_boldkeyword="no";
    ml_type="keyword";
    ml_hfsize=10;
    ml_dfsize=9;
    ml_bfsize=9;
    ml_align="left";
    ml_user="";
    </script>
    <script language=javascript src="http://feed.mylot.com/feed.js"></script></p></div>

    No matter whether I use p, or div, or any combination thereof it throws out the rest of my right hand sidebar. What should I have in the mylot class css to stop it from throwing it out.

    Check http://www.sitefiend.com to see what I mean.

  2. spencerp
    Member
    Posted 8 years ago #

    If you have a div "class", why worry about <p> tag's for? Why not just style the div itself, for what you want? Maybe even give it an "ID" as well.. or something.. ? =/

    Also, you might want to read up on, adding javascript to templates too. =P

    spencerp

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags