CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 14th, 2004, 02:26 PM
j0sh's Avatar
j0sh j0sh is offline
Ruby On Rails Junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Switzerland
Posts: 476 j0sh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 44 m 20 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old March 14th, 2004, 06:50 PM
terminal's Avatar
terminal terminal is offline
nx
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2003
Location: USA
Posts: 626 terminal Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 5 h 28 m 37 sec
Reputation Power: 0
Send a message via AIM to terminal
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>
 


(°_°)

Reply With Quote
  #3  
Old March 15th, 2004, 01:52 AM
j0sh's Avatar
j0sh j0sh is offline
Ruby On Rails Junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Switzerland
Posts: 476 j0sh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 44 m 20 sec
Reputation Power: 6
thats it! thank you

Reply With Quote
  #4  
Old March 15th, 2004, 02:24 AM
c444l c444l is offline
contains a pressurised widget
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: NC USA
Posts: 401 c444l User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 39 m 41 sec
Reputation Power: 5
Send a message via AIM to c444l Send a message via Yahoo to c444l
you can also do this with straight css:
Code:
table {border : black solid 1px }
table:hover {border : red dotted 1px }

Reply With Quote
  #5  
Old March 29th, 2004, 10:44 PM
Ethereal_Dragon Ethereal_Dragon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 Ethereal_Dragon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #6  
Old March 30th, 2004, 02:07 AM
j0sh's Avatar
j0sh j0sh is offline
Ruby On Rails Junkie
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Switzerland
Posts: 476 j0sh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 44 m 20 sec
Reputation Power: 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > change css border-color of a table with onmouseover?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT