March 14th, 2004, 02:26 PM
-
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
March 14th, 2004, 06:50 PM
-
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>
(°_°)
March 15th, 2004, 01:52 AM
-
thats it! thank you
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
March 15th, 2004, 02:24 AM
-
you can also do this with straight css:
Code:
table {border : black solid 1px }
table:hover {border : red dotted 1px }
March 29th, 2004, 10:44 PM
-
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.
March 30th, 2004, 02:07 AM
-
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
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