| View previous topic :: View next topic |
| Author |
Message |
XYR0c
Joined: 01 Nov 2004 Posts: 3 Location: The inner core
|
Posted: Mon Nov 01, 2004 4:57 pm Table Rollovers |
|
|
|
Hello, I am a bit of a novice to this coding and I have some questions.
First off, I have seen on many sites, the use of tables with solid color mouse over rollovers that are used in a table that already has a background image. Am I not explaining this good enough? Well here is an example.
Take the Lava soft homepage http://www.lavasoftusa.com/ . Notice the navigation bar on the left side. Notice how each link has a table rollover that will appear over the table background image. In addition, notice that it is possible to click anywhere in the individual table for it to activate the link.
How is this possible, I looked at the html of the frame source page, but once I tried to duplicate the effect, it did not work, is this because the site runs PHP? Is there a HTML equivalent for this effect?
thank you for your time. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8316 Location: Castle Pines North, CO USA
|
Posted: Tue Nov 02, 2004 2:59 pm |
|
|
|
You can use CSS. I have used it here on http://www.dryheatresorts.com
in the CSS - use something like:
| Code: |
.navCellOff
{
BACKGROUND-COLOR: #000000;
color:#0000FF;
}
.navCellOn
{
BACKGROUND-COLOR: #0000FF;
color:#000000;
} |
And then in your HTML code:
| Code: |
<tr>
<td class="navCellOff" onmouseout="this.className='navCellOff';" onmouseover="this.className='navCellOn';" align="center">
<a href="/about_palm_springs.asp">About Palm Springs</a></td>
</tr> |
|
|
XYR0c
Joined: 01 Nov 2004 Posts: 3 Location: The inner core
|
Posted: Fri Nov 05, 2004 5:45 pm |
|
|
|
| when you say "In the CSS, what do you mean, where would i put that code? and would that still work if i replaced the hex value with an {img src=} to display an image for the background when in the "navcelloff" state? |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8316 Location: Castle Pines North, CO USA
|
Posted: Fri Nov 05, 2004 7:07 pm |
|
|
|
You could try background-url. You might want to take a look at:
http://www.w3schools.com/css/
The code would go in the <HEAD>:
| Code: |
<style type="text/css">
.navCellOff
{
BACKGROUND-COLOR: #000000;
color:#0000FF;
}
.navCellOn
{
BACKGROUND-COLOR: #0000FF;
color:#000000;
}
</style> |
|
|
XYR0c
Joined: 01 Nov 2004 Posts: 3 Location: The inner core
|
Posted: Sat Nov 06, 2004 12:17 pm |
|
|
|
i just cant seem to thank you enough for the link to that site, i ... i think im going to cry.  |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8316 Location: Castle Pines North, CO USA
|
Posted: Sat Nov 06, 2004 1:01 pm |
|
|
|
| Glad I could help. Good luck with the site!! |
|
mikson
Joined: 07 Apr 2005 Posts: 7
|
Posted: Thu Apr 07, 2005 8:33 pm |
|
|
|
how about doing it with changing text color also what i would like to do is rollover from white to black and text from black to white  |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8316 Location: Castle Pines North, CO USA
|
Posted: Fri Apr 08, 2005 4:23 am |
|
|
|
| mikson wrote: |
how about doing it with changing text color also what i would like to do is rollover from white to black and text from black to white  |
Did the roll-overs work with you on the font colors? |
|
mikson
Joined: 07 Apr 2005 Posts: 7
|
Posted: Fri Apr 08, 2005 6:38 am |
|
|
|
| when u rollover over the table not over the link font color doesnt change |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8316 Location: Castle Pines North, CO USA
|
Posted: Fri Apr 08, 2005 11:35 am |
|
|
|
| If it is a link, you might need to set up the links as well in your CSS. |
|
mikson
Joined: 07 Apr 2005 Posts: 7
|
Posted: Fri Apr 08, 2005 12:27 pm |
|
|
|
i know but when there is a table rollover it changes bgcolor of a table but doesnt do anything to link as far as ur mouse isnt over link color of the link wont change for example if u have white page and links are on black and when u try to do rollover table to change bg color to black and link rollover to white when ull rollover over the table only bgcolor of a table will change to black so u wont see link =) i hope u understanded it |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri Apr 08, 2005 1:52 pm |
|
|
|
With CSS2 you can assign the :hover pseudo class to elements, such as table cells.
It will look good in Mozilla etc., but you'll find that IE doesn't support it.
In IE you would have to use javascript onmouseover to change the table cell class. |
|
|