Jump to content

Opacity Issue


lostprophetpunk

Recommended Posts

Hello there,

 

I have decided to experiment with the opacity in different browsers for some images. However...

 

When I test them in the page I want they do not work, but when I test the exact same code (just the css and html related to those images) on a different page they work. I cannot figure out what is wrong.

 

I have tried it both in php and html.

 

		echo "<div id=\"ftitle\"><img src=\"/drew/images/i-v-rwc.png\" alt=\"\" /></div>\n";
	echo "<object width=\"940\" height=\"547\"><param name=\"movie\" value=\"http://www.youtube.com/v/-FrbICttxGQ&hl=en_US&fs=1?hd=1\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/-FrbICttxGQ&hl=en_US&fs=1?hd=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"940\" height=\"547\"></embed></object>\n";
	echo "<br /><br /><div id=\"shots\">\n";
	echo "<a href=\"images/i-b-rwc.png\" class=\"lil\" title=\"Screenshot #1\" target=\"_blank\"><img src=\"images/i-s-rwc1.png\" alt=\"\" /></a>\n";
	echo "<a href=\"images/i-b-rwc2.png\" class=\"lil\" title=\"Screenshot #1\" target=\"_blank\"><img src=\"images/i-s-rwc2.png\" alt=\"\" /></a>\n";
	echo "<a href=\"images/i-b-rwc3.png\" class=\"lil\" title=\"Screenshot #1\" target=\"_blank\"><img src=\"images/i-s-rwc3.png\" alt=\"\" /></a>\n";
	echo "<a href=\"images/i-b-rwc4.png\" class=\"lil\" title=\"Screenshot #1\" target=\"_blank\"><img src=\"images/i-s-rwc4.png\" alt=\"\" /></a>\n";
	echo "<a href=\"images/i-b-rwc5.png\" class=\"lil\" title=\"Screenshot #1\" target=\"_blank\"><img src=\"images/i-s-rwc5.png\" alt=\"\" /></a>\n";
	echo "</div>\n";

 

#shots { width: 940px; height: 100px; }
#shots img { float: left; }
.lil img {filter:alpha(opacity=50); -moz-opacity: 0.5; opacity: 0.5; -khtml-opacity: 0.5; }
.lil:hover img { filter:alpha(opacity=100); -moz-opacity: 1.0; opacity: 1.0; -khtml-opacity: 1.0; }

 

If anyone could help out, thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/210113-opacity-issue/
Share on other sites

"Just doesn't work" doesn't tell us anything - do you get an error? does the page even load or is it blank? :P

 

Can you copy and paste the code on the page that works and the code as it is on the page that doesn't?

 

On a side note, when dealing with single and double quotes, I find it easier to go

echo '<a href="">'; //or
echo "<a href=' '>";

rather than using all of the escape quotes.

Link to comment
https://forums.phpfreaks.com/topic/210113-opacity-issue/#findComment-1096869
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.