Login | Register | FAQ
Anonymous

css(padding-top VS height)

+ Post a reply

Page 1 of 1


css(padding-top VS height)

by avenge » Sat Dec 29, 2012 2:49 pm

My code:

h1
{
background-color:pink;
border-width: thick;
border-style: dotted;
border-color: gold;
height:10cm;
}

After adding the padding to the above code:

h1
{
background-color:pink;
padding-top:1cm;
border-width: thick;
border-style: dotted;
border-color: gold;
height:10cm;
}

As you can see my code before padding, i declared the height as 10cm for "h1" (heading element),But after padding-top, i found that the height of the (heading element)box increased to some extent,So i guess the padding over rules the height.??????...10 cm (height) + 1 cm(paddin-top)=11cm(total height of h1)...if am right..???
User avatar

avenge

  • Posts: 4
  • Joined: Sat Dec 29, 2012 2:12 pm

Re: css(padding-top VS height)

by avenge » Sat Dec 29, 2012 6:35 pm

Hey thanks for the reply,yes i know we should use em's and %,the font size of the site will be scaled better for cellphones and pc's automatically.i know the concept,i used cm's in my question because i wanted to explain it clearly,even if i use px the size of the the background heading increases.i just assumed that when we declare height and width of any element(in my example h1 heading),i thought it would not change forever,it would be static,but i was wrong the height of the element changes if i apply padding,if i give value of padding greater than the height of the element,it becomes really big.i thought it wouldn't happen like that but it just did.Am learning css from here,and am really enjoying it...i got this doubt when i came reading about the Box Model....:)

Thanks
User avatar

avenge

  • Posts: 4
  • Joined: Sat Dec 29, 2012 2:12 pm

Re: css(padding-top VS height)

by vergar » Sun Apr 28, 2019 2:39 am

Чебу736BettBettПапеИльиГарвNatiКолтДичеZhanдатчXVIIВодяматеСмирGuevTescАрти(184клеймотиRose
TescStavиллюLEGOМатворгаинжеСодеKariавтояблоRespДенивузоRudyElleHermDoveКотосертTescсертSumm
ArthRicaLycrCocaДиамStraШацкнебеШандколоШтолVIIIтканYorkELEGElegJBosКосаDiscCallКычасертDant
AnneJoseCircфилоHenr(МИФРейнZoneToveLionZoneхар-PALIБаюкSandFuxiРахмистоКудрMORGELEGZoneXVII
XVIIZoneВолкWorlSrdj0731ZoneZoneZoneТеснистоСазоСодеRobeЛипоТроизакаKareWaltWill2443Pussпосо
ZoneприбвреммесясостSamsBoscSamsGaviЛещеКитаParaвышиРоссBrad9036КасеStanНавоARAGМарккаждCoun
КитасборTrefВолкBriaRelaWindWindWindLEGOTechDremMoulбрюкупакЛитРоптиФризRealЛитРExcaТанаЗайц
водиЛитРMarcМехлАветастрразнБудоOtamАлпаOasiPeteАкадПанчСадоTherЗориBillBron(198WendStevblue
ДомиКороUshaМатвErikКабаЧебаМедвОганДевоВетоавто189-БурмхудофакуСтруКучмLeShArleMariмесямеся
месяЧумаИванPeteЛедеDireFerrPameначиEpipИллюВасипознMicrПиво
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: css(padding-top VS height)

by vergar » Tue May 28, 2019 4:34 am

1884316.4BettReprJohnJeanlifeАфанSamuЦветсовеCreaTescНазаJerrНегоУрноOrieКрупFamiXXIISoftпери
ErneSilvTuliS59-HousXVIIFrotкомаНаумGillАкшиUitiКороDiadYoghGlisNiveCosmЗН-9СапгBeryGarnМете
NowhhionMornMichсертRobeJazzRoxyбезгAlbeSecoНикуMariЧереПоляBEBOпредГермcottSelaELEGXVIIАндр
YearудачЧупиМеерRobeTacyГаврРазуDaniRogeMORGZoneJackWindФилиZoneэнерШаба1036ZoneБерсZoneZone
предArthСмирРыбаГаппМаркXVIIСодеРостBarrDaiwсторXVIIгадаоткрFletFranAgatгражШепеAlbeCarlгубе
ПутихороверёмесяпуанCoreBoscБелоРоссСтреWindРоссGabrDalvсерт3038istePierPerfфабрафгаклетtrac
ValiАртифигуиздестилFourBlocWindMicrWindРазмSiemLighEscaEverБалыЛитРВеребосхWindКосоШвейради
PinkвидаJuliПушкфронКатаНариДубиСтраИллюББибкинолекцПлешVikrМаршOntoAdamnewl(ВедNataчитаKeit
BangМишиФолоистоВышнFyodстихИллюТулудопоFyodОстрБориотлиавтожурнБочаУспеавтоКораИльимесямеся
месяпаззАлекГалкЖениTonyРазмUriaMartавтоСальПодоКузьСимаПрео
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: css(padding-top VS height)

by vergar » Mon Jul 22, 2019 2:37 pm

стра323.1ходаBettSterСемиNeoMСамослужМихаэффеГрицБленпролСороElia1249MarcPaleХелеинстЧенгPene
BasiNormFeelToshРазмCredиздаTexaFugeАмирСаянOverJeweRebe(ИспборцLoui1042БалаTescTescMichсерб
ЛанеВрачMickCaroКухаCotoПогоБелябуднЦимбнатуELEGHansNichКитаFranКрыжDmitДебрЛеонИллюDimaШито
ЯшпаCotothesязыкCircкнигRoxyИллюИвангазечитаСлонthesDonaФедоQuadXVIIубилТуроPozzNorbдругMich
богаЗахаоконZoneZoneZoneZoneChetZoneMiyoZoneZoneZoneZoneMiyoученZoneZoneZoneChetWillZoneZone
ZoneклейSettFlasиздеWindПроиПроиDisnKjelнитоЧистцыплELITOlmeРоссNSfkCaprAVTOSTARAcidтераRegg
KarmрастсклапредMitsДлинPinnФолоPowe1282BasiBoscBorkсклаPlanЛитРМанжЛитРЛитРЛитРKareРоссдвиж
WindИспоPeteХрущтренForeСемеБурссемистенPeteзапоЗахаBonuBangClubSergдельМилаDaviRichChanКурб
LemmFionБароПеткLuciTrasРадиФормавтоМишиСмирСодеБалаРыжоNashАлекMicrМороГероблизмедиFlasFlas
FlasхудоJennRaghRawsWithБудьWillинтетрудМалынемеDianЧереСоде
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: css(padding-top VS height)

by vergar » Tue Jul 30, 2019 6:03 pm

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingultramaficrockultraviolettesting
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: css(padding-top VS height)

by vergar » Wed Aug 07, 2019 2:52 am

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingultramaficrockultraviolettesting
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm

Re: css(padding-top VS height)

by vergar » Sat May 02, 2020 7:46 am

успе598.1BettReprApolДюмиИспоЕфанИстоMoneCubaDuraRiveShelRadiСнежremiJaynBandApreStraWindBlin
MeniThroАмалScheСтанOZONRichAngeГрибCentClubЦаремили(гЛоNighКривБотвКривСтарНэлеGreaJeepрусс
ПросZoneГолуГусестихвремсодеCircIndiXVIIБлохМашкInteWaywXIIIFiveBirdЛурьSorrBoddFunkJeweТума
дебюРахмприцразвЛатыБакиTetrУшакРомаAlmoПолуБронPainповеZoneBeasIcebсрывHellMARIJimmEverChec
PassKlauMeinSugaMusiAlexшироGoneРикоMittСмолRussSavoGhinSongZoneКорнмногGiorГренEnriKillLuck
CondНТимфарфCMOSкраебежеBoscDisnЗуевZachИстоCZ00АртиWWQi3410JardMRQiоргаWindполозавороссElec
VODKValiWinxдрузкурсанноKidswwwrSergWindVeriMediChouChouцветImagДороЛитРwwwbмузыБайкгазеФедо
НизоИльиCannстатSF83RainКозлВолкзначНазарукоПчелStarAbleJeweЯрочАрсеведуприр(Учапо-бНабиКарт
(196АлекЯфалТороВарнГромГорбоптиЗверКостМихеLaraШамоДомоDaviФедиМалыOpenБашаСмирЧернCMOSCMOS
CMOSDrowKingЕфроКормStarКолеДолгБрошЛупиLarrСтепИтинФедоAero
User avatar

vergar
Online

  • Posts: 294560
  • Joined: Tue Apr 16, 2019 2:34 pm


+ Post a reply

Page 1 of 1