Behavior using bgcolor

M

**Mark**

I can't seem to get a behavior setting working right. On
mouseover I want to change the color of the cell. I'm
using Behavior/Insert/Property Change/Add Value:
bgcolor, Setting: FFFFFF (and #FFFFFF) but I keep on
getting a runtime error 11.

Any suggestions?

Mark
 
J

John Jansen \(MSFT\)

Two choices:

1. Add the Value of style.backgroundColor

OR

2. Instead of adding your own value, click on Borders and choose the Shading
tab and change the Background color there.

Don't you love stuff buried 3 dialogs deep? :)
 
G

Guest

Thanks for the suggestion but I was only able to change
the background/forground of the text, not the cell.

Mark
 
M

Murray

Two comments -

<b><font face="Century Gothic" size="2" color="#FFFFFF">
<a href="test3_page2_1a.htm"><font color="#FFFFFF">
<span style="text-decoration: none" id="id3"
onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'id3',1,'style.color','#A3ADC3','style.backgroundColor','#A4AEC4')">Page
2</span></font></a></font></b>

1. Century Gothic is not a websafe font. Those who don't have it installed
will see Times/Times New Roman, and this is likely not what you want.

2. I would apply the behavior to the <a> tag not to the <span> tag, so
change this -

<a href="test3_page2_1a.htm"><font color="#FFFFFF">
<span style="text-decoration: none" id="id3"
onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'id3',1,'style.color','#A3ADC3','style.backgroundColor','#A4AEC4')"Page
2</span></font></a></font></b>

to this -

<a href="test3_page2_1a.htm" id="id3" onmouseout="FP_changePropRestore()"
onmouseover="FP_changeProp(/*id*/'id3',1,'style.color','#A3ADC3','style.backgroundColor','#A4AEC4')"><font
color="#FFFFFF">Page 2</font></a></b>
 
J

Jim Buyens

Set up your table cell like this:

<td align="center" id="tdOver">
<span id="spnOver">here</span>
</td>

then:

1. Selete the <td> tag in the Quick Tag Selector.
2. In the Behaviors task pane, click Insert and then
Change Property.
3. In the Change Property dialog box:
o Click Select Element.
o Set Element Type to td.
o Set Element ID to tdOver.
o Click Borders, then Shading, then select the
background color you want.
4. Click OK to close the Borders And Shading dialog box.
5. Select Restore On Mouseout Event.
6. Click OK.
7. Switch to preview mode and test.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top