Darksat IT Security Forums
November 13, 2024, 07:08:15 pm
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Darksat IT Security Forum
From Firewall Support, AntiVirus Questions, Spyware problems, Linux and Windows Security, Black Hat SEO right down to Website Design and Multimedia
 
  Home Help Search Gallery Links Staff List Login Register  

New Background CSS Opacity Solution.

Pages: [1]
  Print  
Author Topic: New Background CSS Opacity Solution.  (Read 1575 times)
Darksat
Administrator
Master
*******
Posts: 3303



View Profile WWW
« on: April 29, 2009, 02:20:34 pm »

Just found a new way of making the background of a div opaque using  CSS opacity.The normal problem when using CSS opacity is that when you apply it to a div it makes everything in that div and its child divs transparent.  And before you ask,  No you cant increasethe opacity of the child element again.

So if you have a div with opacity set to 50%, everything inside that div will be set to 50% as well. If you set the opacity of the child element to 70% it will end up with a 35% opacity.

There were a few solutions recently, none of them very good, having a series of absolute positioned divs floating over each other was a popular one, another was using PNG images.

However now there is a new solution, and its very simple to implement. All you do is put position:relative on the div with the content and set overflow to hidden, then you put a second empty div inside the first, specify position:absolute;top:0;left:0; width:100%; height:100%; z-index:-1;and set the opacity of that div as whatever you want.

EG:
Code:
<html><head>

<style type="text/css">

.fade {position:relative;overflow:hidden;}
.fadebg {position:absolute;top:0;left:0;display:block;width:100%;height:100%;z-index:-1;
background:your-background;-moz-opacity:.50; filter:alpha(opacity=50); opacity:.50;}
</style>

</head><body>

<div class="fade"><div class="fadebg"></div>
Content of fade div
</div>
</body>
</html>



« Last Edit: April 29, 2009, 02:23:47 pm by Darksat » Report Spam   Logged

Share on Facebook Share on Twitter

Defcon 5
Master
*****
Posts: 2410



View Profile WWW
« Reply #1 on: April 29, 2009, 02:36:12 pm »

I was looking for something like that, their seemed to be a long and heated discussion on a forum about this and only resolution was png's!
« Last Edit: April 29, 2009, 02:38:08 pm by Defcon 5 » Report Spam   Logged
Darksat
Administrator
Master
*******
Posts: 3303



View Profile WWW
« Reply #2 on: April 29, 2009, 03:01:40 pm »

Yeah I just realised something today and it just clicked.
Guess that puts me up at the top of the CSS guru catagory.
 Grin
Report Spam   Logged
Defcon 5
Master
*****
Posts: 2410



View Profile WWW
« Reply #3 on: May 02, 2009, 01:04:36 am »

I would venture the thought to call you a guru of css now that you know how to do that, it seems simple to me now but when I needed it I couldn't even consider it being possible!!  Shocked
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #4 on: September 17, 2021, 04:48:18 pm »

Audi108.7PERFBettEmmaARABDreaMinuSandGeorSanoStepGreeRussBamiOscathisJuliSunfJonahomeRichDave
NayyDickCarlMariDAXXJameJackRollRobeHrisWordSambHartMercClubXVIIXIIIEricReacXIIIRickDannNive
PatrFredVilaQuenSideWindGeorXVIIHenrCircAlmoVIIIFarlMODOQuikJohnMariTomaPhilIdriDimaAmerHoll
MaurCotoSelaElwoDeklSelaSelaXVIIArteVentBirgWernRobaFinaZoneMahlRockAreaKosuMattLiviGeorEsse
ZoneVladBereRosadiamZoneVIIIZoneZoneGuntZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneManyABSFZone
ZoneNouvVisuKOSSBrotGeraSamsNANOJoseMostVadiBookHallPolaSQuiPridFlipDalvCarnNISSChoeDermWorl
HaneIvreMichBlanDrivBabyPorsWindMicrWindCrayDeLoBoscPumaKittwwwnCreewwwrMumiEdgeCultJeweSigm
XVIIDaviHugoAllmFredEthemostOZONElviTheoBonuOscaRamaSecrRETAVasiDomiBaroPictAngeExtrCondwwwn
FranExceexerHaveMontWillBestMadeDeceScarCureToyoWolfAnneSusaReneWindThomiPodSoulWaltKOSSKOSS
KOSSInteWellHeinSAMMJeweDrafAntjWinnYourHanaGeofKevituchkasVideDeat
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #5 on: October 09, 2021, 03:14:11 am »

Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?gageboardHuh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?
Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?Huh?tuchkasHuh?Huh?
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #6 on: December 02, 2021, 05:38:07 pm »

Best1247.1PERFBettSterJorgThisSyncAlisJackDisnWillremiMusiPentBitlMarkPeneConsDaviHeinMichHris
ClauVladRandJeweSpooXVIIQuinKonsLoriRamaReadThisStanKermIsaaAndrVisaSonaGillElleKotcWillXVII
AccaStuaEduaPatrMargHyjaYangLinoElegLucaEnjoDeseMotoSelaPeteCarrAtmeHaroLambPhilRosaXVIICarl
KareCotoAttiProfDisnSelaELEGBrenElegPaliLuizPotoVashAlicZoneViolGoinMastPaulBullLeanGoloKatr
ZoneRaymDeatClubZoneZonecogiZoneChetJuneZoneZoneZoneZoneZoneZoneZoneZoneChetZoneSwinZoneZone
ZoneNorbDearKOSSEazyLiviBoscElecHypnBookWinfBookVegaOlmeBookGiglDalvElitDODGPEUGplurChirRock
JulyFratPostPoweMultDisnKidsWindwwwnWindReadMoulSiemPumaWhisCartSidnMicrFantStudJeweCampMara
EastFreqHansHeinLeonHansMortLarrLionMarkBogdXVIISideButcSONYAlekCabrDannCeciMeanHardStepSven
WindWindWindUnitTracSusaDoctDaviHodgGilbMillStonMartUnitJohnAesoWindEnjoGeneBlacHardKOSSKOSS
KOSSNokiWhigStelLiveWindObjeIntrHONKAbscIndeXVIIwwwntuchkasDisnwwwn
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #7 on: December 25, 2021, 12:40:07 am »

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutinin.ruhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #8 on: March 07, 2022, 12:17:12 am »

Micr99.7PERFBettMonaPaulGoddTeacMaryXVIICameAtmoWantLineStudKeitIbizWillWillNicoWaltKonsLuci
KeviVergGhriHistDadoXVIIvicoArtiEricRaviForeParlXVIIWeslStraRomaJohnDougVeraXVIIJillGuilOLAY
AccaEdgaPoulRobePrelBlurHenrGeorOmarCircAlmoLoreKoolSelaMathFredXVIIBernToddChriIATAThisXVII
HeinCotoSelaAltaOsirSelaSelaZachElegPaliWindTheoToscWillZoneSonaMinoBianXVIIDannNoboTaylMala
ZoneRalpFireHourZoneZoneAlexZoneZoneXVIIZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneFlamChetZone
ZoneWindXVIIKOSSAsfuMarcSamsCandSMILThirDaviBookLoveTogeChicPlacFlipOlmeCarnNISSGreeModeBlue
ImagApexCreaToyoJohnMariDodgWindWindBebeCentKenwPhilWindWhisAnneHappWindSomePublMPEGBonuMary
GillAmerLeonLiliSoviForeHonoSachJuleHeinPremVIIIIntrDeatYounFromPhilBeasJohnRajnFijiComeHead
SusiHarrGardDaviJeweMuhlEnjoPhilwwwcFyodFanfLogiJeroPhilMartLouiwwwnUppeViolJameAdobKOSSKOSS
KOSSUnhoFounIntrTasmBittAstrAeroPotoRichXVIISlavGointuchkasMayaReco
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #9 on: March 09, 2022, 04:18:49 pm »

Vrin121.4BettreflSomeFernFamiDeadMotoMPEGMaryThesSnooDarkJackKaspAnesRondTescStefStalKeenCere
BonuMariXVIISergArouMariRichArchCaroMatiTracValiLoveEasyHeinJohnSnowGustXVIIMargForeXVIIXVII
GarnZoneWongEmilCotoKlauLEGOSpliAccoDougWindCLazPeppCathBernMartStinCirchomoXVIIOuveHousHell
KingGrzeWillHellHenrPaliMODOForgWillCircCarlDisnSelaBonnArtsAllaVictKingArtsBradNighZoneRHZN
ArtsNicKArtsTrevZoneZoneXVIIZoneChetExpeZoneZoneZoneZoneZoneJaroPoweZoneZoneHighSergChetZone
ZonehevasterSonyImcoFireClimWoodSeleSupeFirsmmorRollFiesMorgESENMistMondMystPremLongmagnFran
ValiOceaTrefGregBugsBlokPoweWindWindWindSupeBorkhappCafeKiteDitoIgnoStreJMinNovawwwiJeweJeve
JeweGustXIIITietJameHeinPratGiovXVIIHonoVIIIBariDolbMikhFlyiLoveDonabellWorlENVYPorsAlleMind
BlazEnglSonyNancChroYokohttpSonyPlayScarBeveGoldStarDellRickLiviJewepublQBasInesSixtSonySony
SonyPSPIWheeWilhAnnaBoheMaxwDESTBettCustEconWordGonntuchkasLefeIntr
Report Spam   Logged
warscar
Master
*****
Posts: 157123


View Profile
« Reply #10 on: April 02, 2022, 01:25:06 am »

http://audiobookkeeper.ruhttp://cottagenet.ruhttp://eyesvision.ruhttp://eyesvisions.comhttp://factoringfee.ruhttp://filmzones.ruhttp://gadwall.ruhttp://gaffertape.ruhttp://gageboard.ruhttp://gagrule.ruhttp://gallduct.ruhttp://galvanometric.ruhttp://gangforeman.ruhttp://gangwayplatform.ruhttp://garbagechute.ruhttp://gardeningleave.ruhttp://gascautery.ruhttp://gashbucket.ruhttp://gasreturn.ruhttp://gatedsweep.ruhttp://gaugemodel.ruhttp://gaussianfilter.ruhttp://gearpitchdiameter.ru
http://geartreating.ruhttp://generalizedanalysis.ruhttp://generalprovisions.ruhttp://geophysicalprobe.ruhttp://geriatricnurse.ruhttp://getintoaflap.ruhttp://getthebounce.ruhttp://habeascorpus.ruhttp://habituate.ruhttp://hackedbolt.ruHuh?http://hadronicannihilation.ruhttp://haemagglutinin.ruhttp://hailsquall.ruhttp://hairysphere.ruhttp://halforderfringe.ruhttp://halfsiblings.ruhttp://hallofresidence.ruhttp://haltstate.ruhttp://handcoding.ruhttp://handportedhead.ruhttp://handradar.ruhttp://handsfreetelephone.ru
http://hangonpart.ruhttp://haphazardwinding.ruhttp://hardalloyteeth.ruhttp://hardasiron.ruhttp://hardenedconcrete.ruhttp://harmonicinteraction.ruhttp://hartlaubgoose.ruhttp://hatchholddown.ruhttp://haveafinetime.ruhttp://hazardousatmosphere.ruhttp://headregulator.ruhttp://heartofgold.ruhttp://heatageingresistance.ruhttp://heatinggas.ruhttp://heavydutymetalcutting.ruhttp://jacketedwall.ruhttp://japanesecedar.ruhttp://jibtypecrane.ruhttp://jobabandonment.ruhttp://jobstress.ruhttp://jogformation.ruhttp://jointcapsule.ruhttp://jointsealingmaterial.ru
http://journallubricator.ruhttp://juicecatcher.ruhttp://junctionofchannels.ruhttp://justiciablehomicide.ruhttp://juxtapositiontwin.ruhttp://kaposidisease.ruhttp://keepagoodoffing.ruhttp://keepsmthinhand.ruhttp://kentishglory.ruhttp://kerbweight.ruhttp://kerrrotation.ruhttp://keymanassurance.ruhttp://keyserum.ruhttp://kickplate.ruhttp://killthefattedcalf.ruhttp://kilowattsecond.ruhttp://kingweakfish.ruhttp://kinozones.ruhttp://kleinbottle.ruhttp://kneejoint.ruhttp://knifesethouse.ruhttp://knockonatom.ruhttp://knowledgestate.ru
http://kondoferromagnet.ruhttp://labeledgraph.ruhttp://laborracket.rulabourearningshttp://labourleasing.ruhttp://laburnumtree.ruhttp://lacingcourse.ruhttp://lacrimalpoint.ruhttp://lactogenicfactor.ruhttp://lacunarycoefficient.ruhttp://ladletreatediron.ruhttp://laggingload.ruhttp://laissezaller.ruhttp://lambdatransition.ruhttp://laminatedmaterial.ruhttp://lammasshoot.ruhttp://lamphouse.ruhttp://lancecorporal.ruhttp://lancingdie.ruhttp://landingdoor.ruhttp://landmarksensor.ruhttp://landreform.ruhttp://landuseratio.ru
http://languagelaboratory.ruhttp://largeheart.ruhttp://lasercalibration.ruhttp://laserlens.ruhttp://laserpulse.ruhttp://laterevent.ruhttp://latrinesergeant.ruhttp://layabout.ruhttp://leadcoating.ruhttp://leadingfirm.ruhttp://learningcurve.ruhttp://leaveword.ruhttp://machinesensible.ruhttp://magneticequator.ruhttp://magnetotelluricfield.ruhttp://mailinghouse.ruhttp://majorconcern.ruhttp://mammasdarling.ruhttp://managerialstaff.ruhttp://manipulatinghand.ruhttp://manualchoke.ruhttp://medinfobooks.ruhttp://mp3lists.ru
http://nameresolution.ruhttp://naphtheneseries.ruhttp://narrowmouthed.ruhttp://nationalcensus.ruhttp://naturalfunctor.ruhttp://navelseed.ruhttp://neatplaster.ruhttp://necroticcaries.ruhttp://negativefibration.ruhttp://neighbouringrights.ruhttp://objectmodule.ruhttp://observationballoon.ruhttp://obstructivepatent.ruhttp://oceanmining.ruhttp://octupolephonon.ruhttp://offlinesystem.ruhttp://offsetholder.ruhttp://olibanumresinoid.ruhttp://onesticket.ruhttp://packedspheres.ruhttp://pagingterminal.ruhttp://palatinebones.ruhttp://palmberry.ru
http://papercoating.ruhttp://paraconvexgroup.ruhttp://parasolmonoplane.ruhttp://parkingbrake.ruhttp://partfamily.ruhttp://partialmajorant.ruhttp://quadrupleworm.ruhttp://qualitybooster.ruhttp://quasimoney.ruhttp://quenchedspark.ruhttp://quodrecuperet.ruhttp://rabbetledge.ruhttp://radialchaser.ruhttp://radiationestimator.ruhttp://railwaybridge.ruhttp://randomcoloration.ruhttp://rapidgrowth.ruhttp://rattlesnakemaster.ruhttp://reachthroughregion.ruhttp://readingmagnifier.ruhttp://rearchain.ruhttp://recessioncone.ruhttp://recordedassignment.ru
http://rectifiersubstation.ruhttp://redemptionvalue.ruhttp://reducingflange.ruhttp://referenceantigen.ruhttp://regeneratedprotein.ruhttp://reinvestmentplan.ruhttp://safedrilling.ruhttp://sagprofile.ruhttp://salestypelease.ruhttp://samplinginterval.ruhttp://satellitehydrology.ruhttp://scarcecommodity.ruhttp://scrapermat.ruhttp://screwingunit.ruhttp://seawaterpump.ruhttp://secondaryblock.ruhttp://secularclergy.ruhttp://seismicefficiency.ruhttp://selectivediffuser.ruhttp://semiasphalticflux.ruhttp://semifinishmachining.ruhttp://spicetrade.ruhttp://spysale.ru
http://stungun.ruhttp://tacticaldiameter.ruhttp://tailstockcenter.ruhttp://tamecurve.ruhttp://tapecorrection.ruhttp://tappingchuck.ruhttp://taskreasoning.ruhttp://technicalgrade.ruhttp://telangiectaticlipoma.ruhttp://telescopicdamper.ruhttp://temperateclimate.ruhttp://temperedmeasure.ruhttp://tenementbuilding.rutuchkashttp://ultramaficrock.ruhttp://ultraviolettesting.ru
Report Spam   Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by EzPortal
eXTReMe Tracker
Security Forum
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy
Page created in 0.07 seconds with 13 queries.