Thistimewe'reactuallygoingtobesettingittoostickyinsteadof a relativeorabsolute, andinthatwaywewillletanelementoftheHTMLdocumentremainonthescreenwhilewescrollthroughtherestofthedemodocument.
Thisisthetypeofthingyouhavetobethinkingaboutwherethere's a technicalwaytodosomething, andthenhowyou'reactuallygoingtouseitin a intheuserperspectiveforuserexperienceissomethingthatyou'llhavetofigureout.
Butbasicallyallwe'retalkingaboutherewiththestickypositionsettingis I havethisofthestickystuff.
Thiswillremainhereas I scrollthroughtherestofthedocumentsagain.
Soifyouhad a headerhereandthenyouhadsomekindofmenu.
Soagain, thinkaboutthat.
I otplatform, I'm scrollingthrough.
I'm lookingatdifferentreports.
Andthen I couldjusteasilygouphereandclickon a menuoptiontogoto a differentplacewithintheplatformthat's beencreatedasthetypeofstuffthatyoucoulddowithsticky.
Sobeyondthat.
Let's justgoandtake a lookattheCSSfirstjusttoshowyouhowtheCSSforthisworks.
Whenyouscrollthroughitandit's white, I mean, itworks.
Itstillworks.
It's stillsticky, butit's a little.
It's a littledifficultontheeyestodeterminewhat's what.
Soagain, somethinglikelikeGrayjustaneasywayjusttobeabletofindwhatthatparticulardivISS s O thatreallyallisallthereistoitfor a stickydefpastthatwegodowntothemainDevsimply.
What I didforthemainDaveis I'vesetthepositiontorelativewith a positiontorelativeDoesis, itactuallystarts.
ThenthefirstDivthatwe'regoingtocreateiswe'regonnacreate a dipforthestickystuff.
Soagain, thinkaboutthis.
Thismightbemenuoptionsismightbe a header.
Thismightbesensorreadouts, thattypeofthing.
Youknow, whateveryouwannaputthere.
Themainthingisyousimplysaythatthisis a stickydeath, so I'm creating a stickydib.
SotheclasstickettiveWell, thengobackanditwillhavetheclassofStickydiv, themainimportantthinghereisthatyouwillhave a positionofstickypastthatyou'regoingtothencloseoutthatday.
Byplayingwiththat, youmightfindsomethingthat's usefultogiveyourendusers a desertbetteruserexperienceagainwhentheimportantthingsthatkeephammeringintoyourheadis, it's notsimplyaboutprintinginformationoutontoanHTMLdocument.
It's alsoaboutputtingitin a fashionthatisactuallyusefultotheendusers.
Soagain, having a menubaratthetophavingsensorreadingsatthetop, havingmaybejustjustthatheading, I don't knowagain.
Maybemaybefor a logo, yourlogoorsomethinglikethat, justfor a brandingusageactuallybeingabletousethatstickypositioneyes, somethingthatcouldbeveryvaluableforyouinyourprojects.
Itjustdopositioncolonsticky.
Thenyoustartplayingaroundandgofromthere.
Um, asalways, I enjoydoingthisclassandlookforwardtothenextone.
Ifyoulikethecontentthat I create, pleasethinkaboutgoingtoalignthecomputerguydotcomandbecoming a memberordonating.
Soifyouwanttotheseclassestocontinuetostickaroundandyoufindthemtobevaluable, pleasethinkabouteitherbecoming a monthlymemberordonating a fewdollarsforthisproject.