www.webdeveloper.com
Results 1 to 3 of 3

Thread: onmouseover and cell size...

  1. #1
    Join Date
    Sep 2006
    Posts
    270

    onmouseover and cell size...

    Hi!

    got a little trouble: I just want to define a cell and have a background color change. I use onmouseover. The problem is that the background change applies only on the text area, not the whole cell ...Could you help me so that the background change in "onmouseover" applies to the whole cell and not only half of it ??

    here is my script:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <title>Document sans nom</title>
    
    </head>
    
    <body>
    
    <table width="98%" border="1" cellpadding="0" cellspacing="0">
      <tr>
        <td><div><T onmouseover="this.style.background='#FFFF00'"
       onmouseout="this.style.background='#FFFFFF'"><a href="dddd">dddd</a></div>
    </td>
        <td>ddd</td>
        <td>sddsds</td>
      </tr>
    </table>
    
    
    
    
    </body>
    </html>
    Last edited by patimages; 12-22-2006 at 09:47 AM.

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Not getting any expanding but by eliminating the <p> (which wasn't closed) and the <div> you can narrow the row height:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> 
    <title>Document sans nom</title> 
    </head> 
    <body> 
    <table width="98%" border="1" cellpadding="0" cellspacing="0">  
    <tr>  
    <td onmouseover="this.style.backgroundColor='#FFFF00'"  onmouseout="this.style.backgroundColor='#FFFFFF'">
    	 <a href="dddd" class="Style2">dddd</a>
    </td>  
    <td>ddd</td>  
    <td>sddsds</td>  
    </tr> 
    </table> 
    </body> 
    </html>
    and by placing the color change on the cell you'll solve the other.
    Last edited by TheBearMay; 12-22-2006 at 10:01 AM.
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Sep 2006
    Posts
    270
    brilliant !

    thanks a lot !!!!!!!!!!!!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles