File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to create a semi transparent Div tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to create a semi transparent Div tag" Watch "how to create a semi transparent Div tag" New topic
Author

how to create a semi transparent Div tag

salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

I was looking at this tutorial :
http://www.w3schools.com/Css/css_image_transparency.asp

and based on that, i wrote this code:


to my suprise, it didnt work in IE7.
It works in FF and chrome though.

I do not want a seperate css class but I need to embed it.
What am i doing wrong here ?


My Website: [Salvin.in] Cool your mind:[Salvin.in/painting] My Sally:[Salvin.in/sally]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Problem resolved,

Stupid IE requires a call to has layout.
http://www.satzansatz.de/cssd/onhavinglayout.html

while there are many methods,
I prefer zoom:1
plain and simple.
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

working code:
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
Is is possible to create a semi-transparent image?

Thanks,

Justin


You down with OOP? Yeah you know me!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60041
    
  65

Seems like that'd be easy enough to try.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
salvin francis
Ranch Hand

Joined: Jan 12, 2009
Posts: 917

Justin Fox wrote:Is is possible to create a semi-transparent image?

Thanks,

Justin

Check link in my Original post.
ahmer afzal
Greenhorn

Joined: Oct 12, 2009
Posts: 3
use PNG semi transparent image and apply iepngfix code for i.e 6

Regards
Ahmer Afzal
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
ahmer afzal wrote:use PNG semi transparent image and apply iepngfix code for i.e 6

Regards
Ahmer Afzal


WHY would you want to use an image that requires a HACK and a download when a simple CSS solution exists? Very bad idea.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a semi transparent Div tag
 
Similar Threads
need to place a img element right after a select element, how?
Facelets and JSF
How to create a overlay in html to display ads or internal forms?
opacity tag working for simple text but not for select tag in ie6?
How to specify a variable width column in an HTML page?