SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation html hovering problem

    I made a hovering html code table , but it's only works when i first hovered it ! I want it to works straight away after i open my blog page ! Can anyone help me with the code ?

    This is my code for the hovering effect :

    onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"onmouseout="this.style.opacity=0.1;this.filters.alpha.opacity=40"

    Thx!

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Somewhere below the table:

    Code:
    <script type='text/javascript'>
    
    document.getElementById( 'myTable' ).onmouseover();
    
    </script>
    Tab-indentation is a crime against humanity.

  3. #3
    Barefoot on the Moon! silver trophy
    Force Flow's Avatar
    Join Date
    Jul 2003
    Location
    Northeastern USA
    Posts
    4,524
    Mentioned
    52 Post(s)
    Tagged
    1 Thread(s)
    Your question is a little unclear.

    However, I'm thinking you might also need "onmouseout" to reverse the effects of what you did in "onmouseover".
    Visit The Blog | Follow On Twitter
    301tool 1.1.5 - URL redirector & shortener (PHP/MySQL)
    Can be hosted on and utilize your own domain

  4. #4
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my code..how should add it in?

    <body>

    <table cellpadding="0" cellspacing="0" valign="top" style="margin-bottom: 0px;">
    <tr>
    <td onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"onmouseout="this.style.opacity=0.1;this.filters.alpha.opacity=40" valign="top" height="50px" width="230px" style="background: ;">
    <center><img width="220px" src=" My Picture ">
    <div class="box2">
    <b><font size="2" face="Goudy Old Style" color="#E9E9E9">" My Message "</font></b></center>
    </table>

    </body>

  5. #5
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <html>
    <head>
    <title>TABLE</title>
    </head>
    <html>
    <body>
    
    <table  cellpadding="0" cellspacing="0" valign="top" style="margin-bottom: 0px;">
    <tr>
    <td id="myCell" onmouseover="this.style.opacity=1;this.style.filter='alpha(opacity=100)'" onmouseout="this.style.opacity=0.1;this.style.filter='alpha(opacity=10)'" valign="top" height="50px" width="230px" style="background: ;">
    <center><img width="220px" src=" My Picture ">
    <div class="box2">
    <b><font size="2" face="Goudy Old Style" color="#E9E9E9">" My Message "</font></b></center>
    </table>
    
    <script type='text/javascript'>
    
    document.getElementById( 'myCell' ).onmouseover();
    
    </script>
    
    </body>
    </html>
    Tab-indentation is a crime against humanity.

  6. #6
    SitePoint Member
    Join Date
    Aug 2011
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should i just copy it in or there's certain part i must change?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •