Wow Web Designs Forums Home

Search
   
Members

Calendar

Help

Home
Search by username
Not logged in - Login | Register 


Translucent AP Divs
 Moderated by: Aycan  

New Topic

Reply

Print
AuthorPost
eag58
Member
 

Joined: Mon Jun 4th, 2007
Location:  
Posts: 2
Status:  Offline
Mana: 
 Posted: Mon Jun 4th, 2007 08:22 pm

Quote

Reply
    Hello again, I am trying to make a translucent AP div, in other words I created a AP Div and used a *.png image as its background, which works great in firefox but it only shows a gray box in IE. If you know a solution please help me!

thanks,

PS. i attached a screenshot of what im trying to explain

Attachment: screenshots.jpg (Downloaded 112 times)

TomWhitney
Member


Joined: Fri Dec 30th, 2005
Location: Phoenix, Arizona USA
Posts: 99
Status:  Offline
Mana: 
 Posted: Mon Jun 4th, 2007 11:15 pm

Quote

Reply
IE does not use the PNG alpha channel. To force it to do so put the following code in your style sheet or style section.

/* For IE */
#mydiv
{
   background : transparent;   filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png',sizingMethod='crop');
}
/* For all other browsers */
#mydiv[class] /* make sure your div has a class= attribute */
{
   background : transparent url(image.png) no-repeat top left;
}

 
If you are just trying to add transparency then you can just add opacity to the div but this will not work for the Safari browser (Last time I checked anyways).

         
#mydiv
{
   filter:alpha(opacity=50);   // IE
   -moz-opacity:0.5;           // Moz + FF
   opacity: 0.5;               // Anything that supports CSS3
}

  Tom Whitney - SharkZone Design, Phoenix, AZ
Low Cost Web Design in Phoenix Arizona Web Design


 Current time is 07:47 pm




Powered by WowBB 1.7 - Copyright © 2003-2006 Aycan Gulez
Page processed in 0.2005 seconds (8% database + 92% PHP). 16 queries executed.