#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    120
    Rep Power
    13

    onMouseOver CSS command: add a border via JS


    How to I impliment a JS CSS command to include a border around "TEXT" (margin: 0px; border: solid 1px #00F7FF) WITHIN the following line, during the onMouseover:

    <div Id="menuItem2_1" onMouseOver="JS CODE FOR BORDER">TEST</div>

    I can't add an <a> class because the script code doesn't work properly with it

    shawn
    Last edited by shawn gibson; April 6th, 2002 at 12:15 PM.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Nov 2001
    Posts
    1,882
    Rep Power
    20
    <div Id="menuItem2_1" onMouseOver="this.style.cssText='margin: 0px; border: solid 1px #00F7FF'">TEST</div>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2001
    Posts
    765
    Rep Power
    14
    <style type="text/css">

    .menudef {
    position: relative;
    left : 0px;
    padding: 1px;
    border-width: 0px;
    cursor: hand;
    }
    .menuOver {
    position: relative;
    left: -1px;
    padding: 1px;
    border: 1px #00f7ff solid;
    cursor: hand;
    }

    </style>

    <span id="menuItem2_1" class="menudef"
    onmouseover="this.className='menuOver'"
    onmouseout="this.className='menudef'">
    TEST</span>
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2002
    Posts
    120
    Rep Power
    13
    After the first post (thanks!!!), which worked on a single instance, but seemed to need id-ing (from the 'object undefined' I got for the rest of the 3 billion instances), I tried to 'class' the whole thing and put it into a span, and otherwise remove the inline coding (cuz that stuff drives me nuts). Thanks Mr. Feder. I'm sure this will work

    I wish I could think abstractly

    shawn

IMN logo majestic logo threadwatch logo seochat tools logo