Jump to content

Why no style/opacity in p tag?


croeltgen

Recommended Posts

Hello,I have the following html:<body><img border="0" src="test.jpg" style="opacity:10.;filter:alpha(opacity=40)"onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"onmouseout="this.style.opacity=0.1;this.filters.alpha.opacity=10" /><table style="opacity:1;filter:alpha(opacity=40)"onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"onmouseout="this.style.opacity=0.1;this.filters.alpha.opacity=10"><tr><td>TABLE TEST</td></tr></table><p style="opacity:0.1;filter:alpha(opacity=10);background-color:green;"onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"onmouseout="this.style.opacity=0.1;this.filters.alpha.opacity=10">P TEST</p></body>This works fine with img and table, but for <p> tag it only does the background= but ignores the opacity.It was my understanding that I can do style= in <p>, but why doesnt this work then?Thx,

Link to comment
Share on other sites

my question was not so much about the mouseover stuff: I had added it for demo purpose.I reformulate my question then:In the following code:<body><img border="0" src="test.jpg" style="opacity:10.;filter:alpha(opacity=40)"/><table style="opacity:1;filter:alpha(opacity=40)"><tr><td>TABLE TEST</td></tr></table><p style="opacity:0.1;filter:alpha(opacity=10);background-color:green;">P TEST</p></body>why does the opacity work with img and table, but not with p tag?I tried also to add an id in the <p> and change the opacity in java script: same result - it does nothing.

Link to comment
Share on other sites

Always test in more than one browser. If you can only test in one, always tell us which one. And, as dsonesuk explains, always expect trouble in IE. dsonesuk is providing the most common solution to the extremely annoying "haslayout" problem that only occurs in IE. You can Google that if you want more information.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...