Posted By

speck on 07/02/06


Tagged

css hack opacity


Versions (?)

Who likes this?

395 people have marked this snippet as a favorite

jonhenshaw
luman
arcturus
xaviaracil
Roshambo
designerd
alvaroisorna
joernba
splorp
meth
gardano
cochambre
samuraicoder
panatlantica
marc0047
jkochis
nicolaspar
px
hxseven
zensir
oronm
visualAesthetic
theMacpenguin
peterF
block
lhplam
koncept
KilgoreTrout67
icarus
nankoweap
shachi
Phoenix
happolati
n00ge
cmslounge
manub
m10
fragholrok
fael
rich13
asimovi
silverskymedia
vali29
heinz1959
SamuelMiller
aziz
hariharank12
sjaq
Winkyboy
sp1r1t
adix
skywalker
balinuxster
DFCNT
ernscht
usgraphicscom
stphnclysmth
sosof
vbert
readfred
wbowers
sbbath
maddesigns
gbot
adamsimms
mb
eorwoll
zeljkoprsa
rovision
themolitor
brent-man
stylz
mmccrack
mattkenefick
JustinCrossman
randylien
enajenkins
neb0
riz
pablodgavilan
jamesming
blackabee
Xek
crashdr
nickdoherty
loopdream
marouanomezzine
esquareda
ravenlp
SnipItPrpDemo
titox
conspirator
Leech
l1r
poGDI
zerolab
Wiederkehr
rubensarrio
dmatranga
chippper
asturi
pixelz
numtre
joaosalless
Sn0opy
salibaray
crisb
igor822
AlexWolfe
ilumin
aleprieto
LostCore
jder
Hilyin
jackomono
ozayo
sdudenhofer
yuindustries
mori
LeeRJohnson
elbuenob
bryandease
ping_ch
owais
Anber
johnnytoobad
Bolek
teamnirvana
adesignapart
nreliu
hamiltonmascioli
bigheadlyf
shali
tekbomb
ira
cmahoney
savintsev
danielfilho
fragmentist
nightowl
darkapple
exanimo9
spazione
onetwentysix
smart1
marcustrapp
novatvstdios
JustGreg
markoburns
obsessivejosh
carriegates
svnlto
Meander365
mmd
Blacksnipe
acosonic
mailstefsteide
brianyang
GrillPhil
MazheM
isdereks
marvin_speakman
zoblue
scottyu
chirpyfalcon
ramnath
RagnarR
huynguye
thedeftone
unapersona
almazom
aahmed753
morvan
ruhanirabin
arunpjohny
adambundy
rwczippy
GandalfGrey
ditzah
tmbrenneke
laurasilvani
createinside
svenkaemper
eskey
Flocke
ksantoshp
olragon
bigredjoe
xpoint
cossette
active
ckayra
webtronix
portalpie
davidsp
scitrenbaumgmailcom
davidsi
eivind
jeeremie
dancrew32
dfaulty
geekyjohn
maxpensyl
delikassap
oktay
redstorm
kblair
ByGone
netzmensch
babel2675
ryanisinallofus
LyndseyPearce
fyreflyX
sammiikins
umang_nine
simondiercks
orangemittoo
digiteyes
aleyst
omardixon
sandynata
ahsanhabib
neri
fengelz
electblake
hades985
dkevey
d55beck
jonkemp
digitalifer
mogui
omerta83
jmaties
zwigby
postNuKe
tripdog
vehler
ofadlaoui
PerfectionDesign
sulco
fordsbasement
fillyouin
omayhemo
Fylhan
cartercole
giuliom
Swift-R
hasitha
hugomastromauro
andreagam
Vals
pytheas
savantstyles
ahmedalttai
Aerendyl
jatap
vkolev
nextneed
pchengsf
fauverism
koteus
czterystaczwarty
naeemnur
tedforbes
corangar
gnitter
robknight
adrianspiegel
seanpowell
bobbym245
azipagan
dakin01
cromozooom
mak
jfoy
jamiedollard
hugeidea
theOtherOne
vwal
Al-Kemist
muzafarova
nbehier
capsella
MrFjords
bigfish
okmores
geoffreydv
zreedeecom
mecha
tigr
creativeboulder
chris5marsh
cwulff
stevenlr
murtaugh
pablo808
connorjackson
claudiowebdesign
vaskointeractive
hernanvionnet
0leg
Moonsheeld
petrykowski
passion
RvDesigns
jacoborus
kenjikato
b1tstream
tspitzr
sohei
aegony
onemanstudio
sdxxx
foreverfriday
M-DieSign
kijtra
michellebracken
moopee1176
dismory
qubestream
samkamerer
shanssen
snakespan
anhonestboy
Creatiqfr
luckystokes
julianrhyswilliams
neex123
Woodruff
painteddigital
kenpar
wearefreya
germanny
freidamachoi
lickynee
albertomori
dajocko
sethetter
jondiscipulo
digitalink
SpinZ
merritt212
guo3823538
Briantjuh
henji4
wakeupandrage
nerdfiles
designspaceship
shalomfriss
SFLWebDev
ArnoldDC
dondalos
phuxen
redconservatory
guillaumelebas
tmh27
robotici
cekiert
timr
sommertim
mr2p
Farhan
pulsewax
webod92
rcraven
protopropanol
silent_killer
bustel2
bindirtit
lashon
anhtuan
jaysit
dima7b
jaggermeister
symsec
melaS
jaythakar
arulgg
nnorman8551
astroShark
morphine06
vggallego
petebarr
Lizzychang
erikgeerling
mabad86
crvst
avinay
Beppoi
atulkransingh
beale2013
RicardoMedina
GitarMan
Ballxc0de
henrymcc


Opacity Hack


 / Published in: CSS
 

Sets the opacity of an element and its children. Doesn't validate. Mozilla began supporting the opacity rule in version 1.7, so '-moz-opacity' may not be necessary...

  1. selector {
  2. filter: alpha(opacity=60); /* MSIE/PC */
  3. -moz-opacity: 0.6; /* Mozilla 1.6 and older */
  4. opacity: 0.6;
  5. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: Roshambo on August 16, 2006

As a note, I believe, Gecko 1.7 was implemented in Firefox 1.5.

Posted By: Jo-W on October 8, 2008

Firefox 1.5 uses gecko 1.8 Firefox 1.0 uses gecko 1.7 So anything older then firefox 1.0 does not support opacity

Posted By: netsi1964 on November 13, 2008

Hi, In general I like the Idea of snippets, no doubt about that! But I would love to see some kind of standardilzation of them, preferable in a combination of XML, XSD (schema). You could then transform your XML snippet to what ever purpose you would need it in - say a HTML context. You can validate the input to the snippet using XSD. And some clever programmer might create add-ins for say MS Visual Studio 2008 or other commenly used development tools.

Here is my first thoughts about how it could be put together - based on this snippet for opacity:

Opacity hack
1.0
CSS



     {
    filter: alpha(opacity=); /* MSIE/PC */
    -moz-opacity: ; /* Mozilla 1.6 and older */
    opacity: ;
    }
Posted By: netsi1964 on November 13, 2008

Sorry the system didn't like me pasting XML into the comment field... I try again: Hi, In general I like the Idea of snippets, no doubt about that! But I would love to see some kind of standardilzation of them, preferable in a combination of XML, XSD (schema). You could then transform your XML snippet to what ever purpose you would need it in - say a HTML context. You can validate the input to the snippet using XSD. And some clever programmer might create add-ins for say MS Visual Studio 2008 or other commenly used development tools. Here is my first thoughts about how it could be put together - based on this snippet for opacity: Opacity hack 1.0 CSS { filter: alpha(opacity=); / MSIE/PC / -moz-opacity: ; / Mozilla 1.6 and older / opacity: ; }

Posted By: netsi1964 on November 13, 2008

Sorry - I simply couldnt make my comment containing XML example. So I wrote an article on my blog: http://netsi1964.blogspot.com/ - feel free to read it :-)

Posted By: jadedbat on November 25, 2008

This method does not validate but surely works.. cool with hovers.

Posted By: bucabay on September 3, 2009

To make CSS validate, it is better to set Opacity from JS for older browsers.

Posted By: almazom on October 20, 2009

i use jquery $(selector).css('opacity','.6')

Posted By: shapeshifta on January 5, 2010

yeah, but this has the same effect. it triggers the css in the described way, so why not just use css? :)

Posted By: sb_01 on September 19, 2010

http://css3please.com/ :)

Posted By: vagrantradio on September 24, 2010

@almazom:

Don't try to fix things with JavaScript, websites should function properly with it. JavaScript is merely an enhancement, and should be used as such.

Posted By: marco135 on January 25, 2011

100% crossbrowser hack: .class { filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5; }

from http://css-tricks.com/css-transparency-settings-for-all-broswers/

Posted By: Placehold on July 1, 2011

Use

filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50);

As a fall back for IE

Posted By: amandalaine on September 12, 2011

The right column says "355 people have marked this snippet as a favorite". How do I mark a snippet as a favorite?!?! I have been trying to do this... for months. I don't see the button anywhere on the interface. Thank you. I'm really looking forward to an answer from someone. Thank you in advance!!!!

Posted By: Mikeharry089 on July 12, 2012

Well that's superb! There are many useful ideas in time in it all blog post however I don’t understand if I observe all of them center to heart. There's a number of validity however I'll bring hold viewpoint until I look at it further. Great publish,thanks Hair Transplant in Pakistan

Posted By: sophialily on July 23, 2012

Thanks for informative and helpful post, obviously in your blog everything is good.If you post informative comments on blogs there is always the chance that actual humans will click through. Web Design Dubai

Posted By: camber123 on July 30, 2012

This is a good post. This post give truly quality information.I’m definitely going to look into it.Really very useful tips are provided here.thank you so much.Keep up the good works Top 10 songs

Posted By: christinajulia29 on August 11, 2012

Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here. Vorsorgen

Posted By: christommy on August 24, 2012

I found your website perfect for my needs. It contains wonderful and helpful posts. I have read most of them and got a lot from them. To me, you are doing the great work. Carry on this. work at home In the end, I would like to thank you for making such a nice website. Or where I could also share some of my ranches for sale details for you all budy who come up here Gloss Business Cards || Silk business cards

Posted By: latope2014 on March 16, 2014

Second Life Linden dollar Generator 2014 - Linden hack + Premium

Site Web : http://www.slife-hack.pusku.com/ Site Web : http://www.slife-hack.pusku.com/

A little about Second Life: Few online social networking sites get as much attention as Second Life (SL), the three-dimensional virtual world where users, called residents, can preten­d to be whomever -- or whatever -- they want to be.

Posted By: KhanOf21Century on May 28, 2014

This is a nice code

You need to login to post a comment.