|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
change css border-color of a table with onmouseover?
hi all.
is there a way to change the css border-color attribute of a table with onmouseover? so the table, where the mouse is on, is highlighted in a new color? thanks. ![]() j0sh
__________________
God, you gave man penis and brain, but only enough blood to run one at a time. ![]() my webpage: www.josh.ch my current project: phpmywebmin.josh.ch - a browser based file management application for webspace |
|
#2
|
||||
|
||||
|
try this:
Code:
<table style="border: 1px solid #000000;" onmouseover="this.style.border = '1px solid #ffff00'" onmouseout="this.style.border = '1px solid #000000'"> <tr> <td> some text </td> </tr> </table> (°_°) |
|
#3
|
||||
|
||||
|
thats it! thank you
![]() |
|
#4
|
|||
|
|||
|
you can also do this with straight css:
Code:
table {border : black solid 1px }
table:hover {border : red dotted 1px }
|
|
#5
|
|||
|
|||
|
I am creating a table containing thumbnails. The table has 4 colums, and 11 rows... I am trying to implement a CSS code to have it so that the borders turn white when the pointer is above a specific thumbnail. I want to use a style sheet to cut bad on excessive code, and reduce the size of the html file a little bit.
The basic question is, where should this Style code be located, and how to I reference the individual cells back to it.. again, I am trying to have the borders be black, and an onmouseover changing them to white. Thanks -Zach G. |
|
#6
|
||||
|
||||
|
you can save it somewhere into a .css file:
---style.css--- .thumbnailBordercolor { border-color:blue; border:1px solid; } .thumbnailBordercolor:hover { border-color:red; } ---end file--- then include it with the following link in the header: <link rel='stylesheet' type='css/text' href='path/to/stylesheet/style.css'> the created class ".thumbnailBordercolor" can be included in your cells with <td class='thumbnailsBordercolor'> ... or in the image-tag <a href='...' class='thumbnailsBordercolor'> i hope this works. gr33tz j0sh |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > change css border-color of a table with onmouseover? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|