<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1002986" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1002986</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013190</link>
    <description> &lt;p&gt;Okay, well I do have one problem with the last example I just sent.   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/frown.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;  Sigh.  The table cells are a little &quot;shaky&quot; when you roll over them in IE (though they&#039;re fine in NN).  This is fixed if I use &amp;lt;TD style=&quot;width:100%&quot;&amp;gt; like in John Pollock&#039;s example.  BUT, if I do that, then in IE the first cell in the table becomes very long and all following cells are tiny.  I think it tries to set the table data width to be 100% of the table width (like it would if you wrote &amp;lt;td width=&quot;100%&quot;&amp;gt; in just plain HTML.  I guess I can live with the shakiness, but if anyone knows a way around it, please let me know!  (Maybe it&#039;s only a problem in IE 4.72 &amp;amp; not later versions like 5.0.)  I&#039;ll shut up for a while now.   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;  - Phyllis&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Mar 2000 21:16:00 +0000</pubDate>
 <dc:creator>phyllis</dc:creator>
 <guid isPermaLink="false">comment 1013190 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013189</link>
    <description> &lt;p&gt;Well, I&#039;ve answered my own question (about the centering) for anyone who&#039;s interested.  You can center text in the cells while you&#039;re doing the rollover so long as you use stylesheet attributes to do the centering instead of HTML commands (oops, forgot about that option!).  Here is a simple page I created that uses John Pollock&#039;s example but also centers the information.  This works in both NN 4.5 &amp;amp; IE 4.72.  My only comment on John&#039;s script is that I had to remove the phrase &quot;width:100%&quot; from the style definition of TD, otherwise I got strange cell widths in Explorer(?).  Well, here goes.  I&#039;m MUCH happier to find a way to make these rollovers work in NN as well as IE than I would have been to find a shorter way to write them with &quot;hover&quot; (which I have not yet seen.  Hopefully, I can eventually shorten this page:&lt;/p&gt;
&lt;p&gt;--------------------------------------------&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Testing tables&amp;lt;/title&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
A.nav:link {color: #ffffff; text-decoration: none; font-size: 9pt; font-family: Arial; text-align: center; vertical-align: middle}&lt;/p&gt;
&lt;p&gt;A.nav:visited {color: #ffffff; text-decoration: none; font-size: 9pt; font-family: Arial; text-align: center; vertical-align: middle}&lt;/p&gt;
&lt;p&gt;A.nav:active {color: #ffffff; text-decoration: none; font-size: 9pt; font-family: Arial; text-align: center; vertical-align: middle}&lt;/p&gt;
&lt;p&gt;td {background-color: #000080; text-align: center; vertical-align: middle}&lt;/p&gt;
&lt;p&gt;--&amp;gt;&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/head&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;body&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;table width=&quot;400&quot; cellspacing=&quot;1&quot; cellpadding=&quot;1&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
     &amp;lt;TD width=&quot;50%&quot; onMouseover=&quot;this.style.backgroundColor=&#039;#ff0000&#039;&quot;     onMouseout=&quot;this.style.backgroundColor=&#039;#000080&#039;&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;ILAYER&amp;gt;&lt;br /&gt;
     &amp;lt;LAYER ID=&quot;la2&quot; bgColor=&quot;#000080&quot; width=&quot;100%&quot; onMouseover=&quot;this.bgColor=&#039;#ff0000&#039;&quot;&lt;br /&gt;
      onMouseout=&quot;this.bgColor=&#039;#000080&#039;&quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;a href=&quot;Hello&quot; class=&quot;nav&quot;&amp;gt;Hello&amp;lt;/a&amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;/LAYER&amp;gt;&lt;br /&gt;
     &amp;lt;/ILAYER&amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;/TD&amp;gt;&lt;/p&gt;
&lt;p&gt;     &amp;lt;TD width=&quot;50%&quot; onMouseover=&quot;this.style.backgroundColor=&#039;#ff0000&#039;;&quot;&lt;br /&gt;
      onMouseout=&quot;this.style.backgroundColor=&#039;#000080&#039;&quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ILAYER&amp;gt;&lt;br /&gt;
     &amp;lt;LAYER ID=&quot;la2&quot; bgColor=&quot;#000080&quot; width=&quot;100%&quot;&lt;br /&gt;
      onMouseover=&quot;this.bgColor=&#039;#ff0000&#039;;&quot;&lt;br /&gt;
      onMouseout=&quot;this.bgColor=&#039;#000080&#039;&quot;&amp;gt;&lt;br /&gt;
&amp;lt;a href=&quot;World&quot; class=&quot;nav&quot;&amp;gt;World&amp;lt;/a&amp;gt;&lt;br /&gt;
     &amp;lt;/LAYER&amp;gt;&lt;br /&gt;
     &amp;lt;/ILAYER&amp;gt;&lt;br /&gt;
     &amp;lt;/TD&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/p&gt;
&lt;p&gt;--------------------------------------------&lt;/p&gt;
&lt;p&gt;Thanks for all the responses!  And thanks to the person who gave me the link to &quot;Style Master.&quot;  It was after downloading &amp;amp; playing with it that I remembered the &quot;text-align: center&quot; &amp;amp; &quot;vertical-align: middle&quot; statements.   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;Phyllis&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Mar 2000 20:46:00 +0000</pubDate>
 <dc:creator>phyllis</dc:creator>
 <guid isPermaLink="false">comment 1013189 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013188</link>
    <description> &lt;p&gt;Hi &amp;amp; thanks for all the responses!  I&#039;m going through each of them.  I visited Jon Pollock&#039;s tutorial which was VERY helpful.  Though it didn&#039;t answer my &quot;hover&quot; question, it did show a way to change the cell background colors in both Netscape &amp;amp; Explorer (something I had given up on altogether).  To anyone else who has been through his table cell tutorial:  Do you know any way to make the data in the table cells center?  Once I used the &quot;style&quot; &amp;amp; &quot;ilayer&quot; tags, the table data cells no longer recognized &quot;align=center&quot; or &quot;valign=whatever&quot;, and if you use center....center tags, it moves the data vertically up inside the cell (though it DOES center it horizontally).   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/frown.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;  If anyone has a workaround to this, I&#039;d really love to hear it.  Again, thanks for all the responses.  - Phyllis&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Mar 2000 18:04:00 +0000</pubDate>
 <dc:creator>phyllis</dc:creator>
 <guid isPermaLink="false">comment 1013188 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013187</link>
    <description> &lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;   Something I&#039;ve been playing with, but haven&#039;t written up for my site yet.  The isOk var is defined elsewhere as an IE ver 4+ compatible browser.&lt;/p&gt;
&lt;p&gt;   Hope this helps.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
function swapColor(cell, switchOn)
{
  var source;
  if (!isOk)
  {
     alert(&quot;Sorry this script works only with IE browsers.&quot;);
     return 
  }
  source = document.all[cell];
 
  if (cell == &quot;cellB1&quot; &amp;amp;&amp;amp; switchOn != true)
  {
     if (document.myForm.C1.checked)  source.bgColor = document.myForm.C1.value;  
      else                            source.bgColor = document.bgColor;
  }
  else
  {
    if (switchOn == true)
        source.bgColor = &#039;#66ff66&#039;;
    else if (switchOn == false)  source.bgColor = document.bgColor;
    else                         source.bgColor = switchOn;
  }
}

  &amp;lt;td&amp;gt;&amp;lt;form name=&quot;myForm&quot;&amp;gt;
            &amp;lt;p align=&quot;center&quot;&amp;gt;&amp;lt;input type=&quot;radio&quot; name=&quot;R1&quot;
            value=&quot;#66ff66&quot; onclick=&quot;swapColor(&#039;cellA0&#039;,true)&quot;&amp;gt;Lime
            &amp;lt;input type=&quot;radio&quot; name=&quot;R1&quot; value=&quot;#ff6666&quot;
            onclick=&quot;swapColor(&#039;cellB0&#039;,this.value)&quot;&amp;gt;Red &amp;lt;input
            type=&quot;radio&quot; name=&quot;R1&quot; value=&quot;aqua&quot;
            onclick=&quot;swapColor(&#039;cellA0&#039;,this.value)&quot;&amp;gt;Aqua &amp;lt;input
            type=&quot;checkbox&quot; name=&quot;C1&quot; value=&quot;aqua&quot;
            onclick=&quot;swapColor(&#039;cellB1&#039;,this.value)&quot;&amp;gt;Aqua &amp;lt;/p&amp;gt;
        &amp;lt;/form&amp;gt;
        &amp;lt;div align=&quot;center&quot;&amp;gt;&amp;lt;center&amp;gt;&amp;lt;table border=&quot;1&quot;
        width=&quot;100%&quot; cols=&quot;3&quot;&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td id=&quot;cellA0&quot;&amp;gt;Names:&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellA1&quot;&amp;gt;Dick&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellA2&quot;&amp;gt;Jane&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td id=&quot;cellB0&quot;
                onmouseover=&quot;return swapColor(&#039;cellB0&#039;,true)&quot;
                onmouseout=&quot;return swapColor(&#039;cellB0&#039;,false)&quot;&amp;gt;English:&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellB1&quot;
                onmouseover=&quot;swapColor(&#039;cellB1&#039;,true)&quot;
                onmouseout=&quot;swapColor(&#039;cellB1&#039;,false)&quot;&amp;gt;85&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellB2&quot;&amp;gt;55&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;td id=&quot;cellC0&quot;&amp;gt;Math&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellC1&quot;&amp;gt;95&amp;lt;/td&amp;gt;
                &amp;lt;td id=&quot;cellC2&quot;&amp;gt;75&amp;lt;/td&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/table&amp;gt;
        &amp;lt;/center&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;

[/code]

------------------
&lt;a href=&quot;http://members.aol.com/grassblad&quot; class=&quot;bb-url&quot;&gt;GrassBlade: cut&amp;amp;paste javascript&lt;/a&gt;

[This message has been edited by Vincent Puglia (edited 17 March 2000).] &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Sat, 18 Mar 2000 02:27:00 +0000</pubDate>
 <dc:creator>Vincent Puglia</dc:creator>
 <guid isPermaLink="false">comment 1013187 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013186</link>
    <description> &lt;p&gt;I think this is what you are after. It still needs a bit of work.&lt;/p&gt;
&lt;p&gt;Add the following to the cells you want to change:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;class=&quot;nav&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Give each cell a unique id value:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;id=&quot;cell1&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Add this b/w your &amp;lt;body&amp;gt;&amp;lt;/body&amp;gt; tags after your table:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
function cellOver() {
   if (event.srcElement.className == &quot;nav&quot;) {
      document.all(event.srcElement.id).style.backgroundColor = &quot;red&quot;;
      }
   }

if (document.all) {
   document.onmouseover = cellOver;
   }
[/code]

You can add your own mouseOut code.

The only problem with this script is that each cell requires a unique id value. eg. id=&quot;cell2&quot;. If this is left out the script will not work.

I want to change this so you don&#039;t have to add the id=&quot;&quot; part to make it simpler. But right now I don&#039;t know enough to make this happen. I am reading up in this area now and I will post more info if I find a better solution.

------------------
Lloyd Hassell
    &lt;a href=&quot;mailto:lloydhass@hotmail.com&quot; class=&quot;bb-email&quot;&gt;lloydhass@hotmail.com&lt;/a&gt;    
 &lt;a href=&quot;http://go.to/hass&quot; class=&quot;bb-url&quot;&gt;http://go.to/hass&lt;/a&gt; &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Sat, 18 Mar 2000 02:15:00 +0000</pubDate>
 <dc:creator>Lloyd Hassell</dc:creator>
 <guid isPermaLink="false">comment 1013186 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013185</link>
    <description> &lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Visit: &lt;a href=&quot;http://www.westciv.com/style_master/academy/css_tutorial/index.html&quot; class=&quot;bb-url&quot;&gt;http://www.westciv.com/style_master/academy/css_tutorial/index.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;It will help you to learn everything you want to know about CSS, CSS1, CSS2 .&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;NSS&lt;/p&gt;
&lt;p&gt;[This message has been edited by NSS (edited 17 March 2000).]&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Mar 2000 02:01:00 +0000</pubDate>
 <dc:creator>NSS</dc:creator>
 <guid isPermaLink="false">comment 1013185 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013184</link>
    <description> &lt;p&gt;here you go   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;br /&gt;
 &lt;a href=&quot;http://www.pageresource.com/dhtml/jtut6.htm&quot; class=&quot;bb-url&quot;&gt;http://www.pageresource.com/dhtml/jtut6.htm&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;and that&#039;s John Pollock&#039;s tutorial  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
&lt;p&gt;[This message has been edited by AndyB (edited 17 March 2000).]&lt;/p&gt;
 </description>
     <pubDate>Sat, 18 Mar 2000 00:07:00 +0000</pubDate>
 <dc:creator>AndyB</dc:creator>
 <guid isPermaLink="false">comment 1013184 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013183</link>
    <description> &lt;p&gt;Hi:  Thanks for your response.  I&#039;m really happy to have found this bulletin board!  Unfortunately, what I am trying to figure out is a way to change the background color of a table data (NOT the background-color of the text itself).  Changing the background color of the text makes a really tight colored box around the words, but what I want is for the color of the whole table cell to change.  I can do this on every link by using the line: onMouseOver=&quot;parentElement.style.backgroundColor=&#039;#ff0000&#039;&quot; because &quot;parentElement&quot; tells it to affect the TD, not the text.  I was just hoping there was some way to write that into the stylesheet (with &quot;hover&quot;) so I didn&#039;t have to insert the onMouseOver string on every link I use for navigation.  An easier way sounds logical, but I can&#039;t figure one out!  But thanks for your suggestions.  - Phyllis&lt;/p&gt;
 </description>
     <pubDate>Fri, 17 Mar 2000 23:04:00 +0000</pubDate>
 <dc:creator>phyllis</dc:creator>
 <guid isPermaLink="false">comment 1013183 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013182</link>
    <description> &lt;p&gt;Well if I am understanding you correctly you pretty much only want it to work in IE. Which supports sytlesheets &quot;:hover&quot;.&lt;/p&gt;
&lt;p&gt;I hops this is what you where looking for.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;code:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;
&amp;lt;!--
a.nav {color: White; text-decoration: none; font-family: Tahoma Helvetica; font-weight: normal; background-color: #3333cc }
a.nav:hover {color: White; text-decoration: none; font-family: Tahoma Helvetica; font-weight: normal; background-color: #003300}
--&amp;gt;
&amp;lt;/style&amp;gt;
[/code]

Well I hope this helps
VulKen
&lt;a href=&quot;http://www.bigwavemail.com&quot; class=&quot;bb-url&quot;&gt;BigWaveMial&lt;/a&gt; &lt;/pre&gt;&lt;/blockquote&gt;</description>
     <pubDate>Fri, 17 Mar 2000 22:41:00 +0000</pubDate>
 <dc:creator>Ken Elliott</dc:creator>
 <guid isPermaLink="false">comment 1013182 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/hover-stylesheet-dhtml#comment-1013181</link>
    <description> &lt;p&gt;Hi.  I tried your suggestion and, though it works, it changes the background-color only around the text and not the whole cell.  I guess it still thinks I only want to affect the contents of the cell rather than the cell itself.  Yet the parentElement reference with onMouseOver (that I mentioned previously) works, so I don&#039;t know what to try.  I don&#039;t know any way to write &quot;parentElement.style.backgroundColor&quot; other than as dot notation.  I was hoping to avoid writing the onMouseover lines over &amp;amp; over.   &lt;img src=&quot;http://www.webmaster-forums.com/ubb/frown.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;  But thanks for your suggestion.  I&#039;ll keep trying!  - Phyllis&lt;/p&gt;
 </description>
     <pubDate>Fri, 17 Mar 2000 21:50:00 +0000</pubDate>
 <dc:creator>phyllis</dc:creator>
 <guid isPermaLink="false">comment 1013181 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
