Butifthiswasgoingtobeon a webpage, obviouslyin a productionenvironment, thiswillbepointingtomultipledifferentimages.
Buthereagain, I canbasicallypointtothesameimageandshowyouthedifferentthingsthat I could D'ohesoessentiallyhere I havetwoimagesonWhat I'vedonethenis I'vecreated a title.
Sobasically, I'vecreated a titleclassandhereforthattitleclass, thethetextisgoingtobewhitewith a backgroundoflightgray.
I'vebeensaidthatbasicallythereis a div.
Sowhatwehavehereiswehave a debatethat I havecenteredonthepageandsowithinthatdefy I'vesaidfromthetopandfromtheleft, thisiswherethetextshouldbeprinted.
Thenforthe p tagagainforlikelet's sayadditionalmadeitmetadatadownhere.
Simplyliketaken, youknow, july 4th, 2011.
Thisisanadditionalclasses, a differentclass, andbasically I'vejustsaidfromthebottomandfromtheleft, thisiswheretheyshouldbeprintedout.
Whenwegohereandwetake a look, I useaneighttotagagain.
Justbasically a differentexample.
You'llnoticeagainstus.
I'm usingtheclass.
I canusedifferenttagsinordertotowriteoutthistext.
Itwillstillbeinthesameposition.
Itwillstillhavealltheotherdefaultformatting s O thatusing a totagandtitleanothercoolpickandthendownhereagain, Let's saythat's forwhenthepicturewastakenorwhateverelse.
Nowimagineifyouhadpicturesthatwereyouweresendinguptosomekindofmachinevision a p i orserverlessarchitecture, thatmachinevision a p I wouldthentellyougiveyoutagsofwhatitthinksisinthoseimages.
Andsobasically, youcouldthencreate a webapplicationwhereyouseewhatthepictureis.
Nowwe'regonnagettotheinterestingpartsandwhat I wantyoutounderstandiswhenwe'retaking a lookattheimageandtheoverlayandeverything, allofthatiswithinthisone, def.
Sobasically, we'regonnacreate a diffthinkofus, Divas a canvas.
We'regonnabecreatingthecanvasandthey'regonnabeputtingeverythingintothatcampus s Wehave a debateaboutdoing a div, andthisclassisgoingtobetextoverlay.
So I'vecreated a classtextoverlayforthisclasstextoverlay.
I put a positionofrelative.
Thereason I put a positionofrelativeusingCSSisitallowsmetopositionthatthatDivonthepage.
Sowhat I'm doingis I'm centeringthedivonthepage.
Soshowsup, obviouslythecenter.
Sobasically a positionofrelativemarginhyphenleft, automarkethyphen, right, Auto, thatisgoingtocenterthedebatenow, animportantthingtounderstandhereisthat I'vebeencreated a witand I heightforthedeath.
Sowhat I wanttosayis, I want I wantthistobe a maximumof 300 pixelswideontheheightWillwillbewhatevertheautomaticwillbe, whatevertheautomaticisfortheimage, whythatbecomesimportantiswewouldgodownhereandthenextthingthatwe'regoingtodoiswe'regoingtoaddtotheimageitself s o forthe I.
M.
P tag.
We'regonnaaddanimageandthatisgoingtobepicture a 700 dot j p g.
NowWhythisisimportantisthisisanimage I haveusednumeroustimesthepastthatcreateditasanexampleAh, a lotofclassesagoandwhyit's called 700 isbecauseit's 700 pixelswide.
Well, whatdoyouthinkisgoingtohappenif I put a 700 pixelimageinto a 300 pixelcontainer?
Essentially, um, nastinessisgoingtohappen, right?
Sooneofthingsandthat's whatyouhavetobethinkingaboutisthenwhat I'vedoneis I formatinthe I M e tagorintheCSSworld, the I amkeyelement.
Andwhat I'vesaidismaketheMaxWittofitbe 100%.
So I wentthemaxwithofthisimagetobe 100% ofessentiallywhatevercontainer I putitinto.
So I putthisdirectlyunderanHTMLdocumentwithoutanydibs.
Sothefirstthingthatwehavehereiswehave a tchonethatisgoingtobe a classofoverlayhyphentitle.
So I created a classcalledOverlayhyphentitle, andthiswillbethetitleCoolpick.
Sowe'regonnagodownandtake a lookattheclassofoverlayhyphentitle.
Soforthisoneimportantthingsunderstandiswhenyousayposition, thepositionhastobeabsolute, Sopositionrelativehere, I makethepositionrelativesothat I canmovetheimageroundonthebasicblackandmovethedibaroundonthescreenso I canputitinthecenterhere.
I'm goingtomakethepositionabsolute, because I'm actuallygoingtosaywhere I wantthistexttoshowupwithinthatdivwithinthatcontainer.
Theimportantthingtounderstandhereiswhatyou'rereallydoingisyou'repositioningtextwithin a divessentiallywithin a containerthatyou'vecreatedthathappenstoalsocreatecontainanimage, right, that's MME.
Theirtoealsorealizesthatyoudohavetoformattheimage, fileitselfproperlyagainororyou'llget a messIfyoutrytoput a 700 pixelimagefileinto a 300 pixelcontainer.
Basically, it's notgonnaworkoutsowell, eh?
Sonowyouknow a littlebitmoreabouthowtoformatimagesusingCSSNow, thiscouldbe a veryimportantthingintheWebdevelopmentworld.
Basically, ifyou'recreatingWebAPSorKorean, he's a criminal.
Documentsisoneofthebigissues, especiallyfornewnewdevelopersistheyalwaystrytorunbacktoimageeditingsoftwarewhenevertheyneed a newemmick s.
Solet's sayyouhaveanimage.
Youneedtohaveitmodified a numberofdifferentwaysforforthedifferentwaysthatyou'regoingtodoitwithinyourWebapplication.
Whathappens a lotoftimesisthatpeoplethansimplyusesomekindofimagingsoftware, photoshop, youknow, whateverelsetoemodifytheemmickandthentheyendupcreating, youknow, 10 or 20 variationsessentiallyonthesameimagefile.
Imagineifyouwanttotweakthecolor, youwanttotweakthelogo a littlebitsomethinglikethat.
Notonlydoyouhavetotweakonefile, youtweet 20 filesBeyondthat, ifyou'regonnabeusingthatin a Webapplication, basicallythisisgonnabebroughtoveran I s p connectionoveranInternetconnection.
There's a lotofcoolstuffyoucandowithCSSwithyourimagesandwhatyouhavetothinkaboutfrom a resourceperspectiveisthenallyou'redoing.
They'resending a coupleoflinesoftextlikeImaginesendinganentireimagefileonthesizeandrequirementsforthat, versusfivelinesoftext, right, emittedof a certainclassorwhateverelseblah, blahblah.
It's a loteasieronsystemstobeabletoparsethatmostoftime, thentobesendinglotsandlotsoflotsofimagefiles.
Soifyouwanttotheseclassestocontinuetostickaroundandyoufindthemtobevaluable, pleasethinkabouteitherbecoming a monthlymemberordonating a fewdollarsforthisproject.