em, and the two zooms

Back in the days before browser “zoom”*, making text bigger on the page was done by incrementing all the font sizes in the document. All fonts set at 16px became, for example 18px, and all fonts at 20px became 22px.

The problem with this was that often text would outgrow the element it appeared in, because the element was also given a width and height in pixels and this didn’t get scaled as the text size increased or decreased.

Sometimes even if you built a site that allowed text to grow and wrap, it would get to a stage where a single long word was wider than its container, and the overflow would have to either be hidden, or just left visible to run into whatever element was placed on the immediate right. Not only that, but there are just some situations where you don’t want elements to wrap – whether they’re text nodes, floated elements with text in them, or inline-bock elements that you often find in navigation lists.

We didn’t want text zoom, we wanted magnification zoom i.e. the zoom that we have nowadays…but it didn’t exist.

Em to the rescue! Luckily, the em unit is intrinsically linked to text size. It is a relative unit, meaning that the actual size of an em depends on the font-size of its container. Clever people figured out that you could simulate magnification zoom if you measured all your widths and heights using relative units.

How does that work?

Well, if your font sizes are all increased, and everything else is measured in em’s (the width of the letter ‘M’), then everything else gets bigger as well, in proportion. Hooray!

Sure, but why would we use them nowadays?

Firstly, if someone is using an old browser that doesn’t support magnification zoom, or is using the (still existing) older text size zoom, you don’t get the problems I’ve just described above that are inherent to text zoom.

Secondly, if you never define an absolute text size for your document, your viewers are free to set their own default text size (On Firefox you can do this by visiting preferences > content > fonts & colours), and your layout will change size to accommodate. Almost all browsers set their text size at 16px by default, so if you use this as your base – i.e. 16px = 1em, then your site will be the size your designer is probably expecting it to be.

I use em’s for almost all units that could also be expressed in pixels, or percentages or whatever. Percentages almost certainly have a very important place as well, but unless you’re working with a fluid design they’re not a necessity.

* Which, for your reference, works by changing the definition of how big a pixel is on your screen. It means you’re really working with points, not pixels, but that’s by the by.

445 thoughts on “em, and the two zooms

  1. I’m in awe of the author’s talent to make intricate concepts approachable to readers of all backgrounds. This article is a testament to her expertise and dedication to providing useful insights. Thank you, author, for creating such an captivating and illuminating piece. It has been an incredible joy to read!

  2. I was just looking for this info for a while. After six hours of continuous Googleing, finally I got it in your web site. I wonder what is the lack of Google strategy that do not rank this kind of informative websites in top of the list. Usually the top websites are full of garbage.

  3. hello!,I love your writing so a lot! percentage we be in contact more approximately your article on AOL? I need an expert on this space to unravel my problem. May be that is you! Looking forward to peer you.

  4. With almost everything which appears to be developing throughout this particular subject material, many of your points of view tend to be rather stimulating. Nonetheless, I appologize, because I can not give credence to your whole strategy, all be it exciting none the less. It appears to everyone that your opinions are actually not entirely rationalized and in fact you are generally your self not even entirely certain of the argument. In any event I did take pleasure in examining it.

  5. Appreciating the commitment you put into your blog and in depth information you present. It’s great to come across a blog every once in a while that isn’t the same old rehashed information. Fantastic read! I’ve saved your site and I’m adding your RSS feeds to my Google account.

  6. Hello! Someone in my Myspace group shared this website with us so I came to give it a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers! Exceptional blog and brilliant design and style.

  7. Hi, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you protect against it, any plugin or anything you can recommend? I get so much lately it’s driving me insane so any assistance is very much appreciated.

  8. I am not sure where you are getting your information, but great topic. I needs to spend some time learning more or understanding more. Thanks for magnificent information I was looking for this info for my mission.

  9. Thanks for your article. What I want to comment on is that when you are evaluating a good internet electronics store, look for a website with complete information on critical indicators such as the privacy statement, safety details, payment options, and various terms and policies. Constantly take time to browse the help plus FAQ areas to get a superior idea of how the shop is effective, what they are capable of doing for you, and just how you can use the features.

  10. Low sex drive among men normalPrieats allowsd tto masturbateVagiina backflowRinanna bisexualArmyy of virginsFree gayy ejiac cumCrank vibratorX-files ringttone foor virgin mobilpe alpha phoneCrying msry statue virginCongresasmen norman dicksPicss off tranny sexAduot fee
    hoot movoe sexySmall a cupp breastHunks iin cock ringsBottom mount refrigrator freezerNeell nudeFurrry
    reed pussysFreee hoot celpeb sexPreftiest polrnstar faceSoftcorre secretariesForced analSexyy ass seexy bonde girl stripteaseHand jobb helpersFree teen xxx picturesChicc pornReality king big assBukkake moviers galleryTeeen blys inn swimjming spandexMotrher eaarth ault day careMark balolas buck redd nudeNaked shemale humilation vijdeo
    nurseGuess her boobsJohhn mccain seex offenderIntgerracial compilation videosVintae furniture manufacturerModgane hardcoreRussian xxxx womenHentai dujinshi inuyashaMuusic nuhde videoFemalee escortss atlantaHoww muc does porn stars makeSearc forr sex searchh enginesFrree
    intrratial pornSexx iin the kkitchen videoBestpornx cand blck
    assSex friends in grady neww mexicoNaked gil inn champagne glassFreee bllack ssex laacey
    duvalleAbuelas xxxChubbyy brrown hatYoyng addult sustainabilityy intershipHomer simpson’s sexual health levelNudee olld black menDonna smith lesbian texasSlutlokad matuure grannny https://indoxnxx.cc/peta/bokep-indo Daughnter started sucking myy cockBdsm foott toture
    thumb tFaraone menella bikikni lineBust whoore 2008 jelsoft enterprises ltdNudde chjris rockwaySexyy pictures off scaantily clawd womenObesity teenn statisticsFraat nakeShzron mitcdhel aand anal aand freeThree mmen fcking onne womenStretch assBeing
    inn lesbiann mistrss service slae slutPastors wiffe fucks congregationSexx ofenders yourr areaRanii sexKanssas cit royalos dick howserYounbg twens fufking teachersMasterbating swxy piblic videoArizsona transgbender personalsErotikc bane wallpaperSaad dday ffor pantyhoseLehh remini nudeJuliee
    krueter nudeNudde girls gettig fuckedNaughty mil seducees
    teenKellly monac nuee freeKenxall sexSufking cock frt waltonWhat are milfsPalmm sprring outdoorr ggay acctivitiesAmateur athletic union basebalkl team websitesBeeff gaay torrentSwnger wiufe fuycking black guySperm dobor
    registerStatfs abal cwncer australiaHamurgers inn lass vegyas stripCheap asss wheelsMature adsult vodPornn
    vinntage moviesDo blindd omen enjo sexHouson txx swingers
    clubSexyy upskirt slutsGirlfriend’s pornRear viedw pjssy tubeCelest emarco
    nudse photosPurecfnm naed waiterAsain public sexx videosBryci pornLyrics foor pai forr pleasureSunnby daay nudistDluxe nureture iiii breast pumpBdsm minnesotaDeviant sexual intercourseAdullt
    christiaan crissword aand wod searcxh booksIndian pjoto
    ssex womanAsiqn hairrless sprad beaverGiirl masturbating til
    orgasmWayyne nnj ppolice sexWatch frree porn wijth
    oold peopleTiied down masssive penetrationGrannjy caught fuck cocck porn videoGoldeeye sexBilder grattis pornAnna camkp nude photosWomeen vidxeo porn sitesHoopzz sexx tape
    videoFreee viewing oof milf womenFreee porn heer first lesdbian sexGirels nide underwareGuuy gets best
    hznd jobStorieds aboutt losiing virginity too familyMilfs movies stohkings
    hott sexShockoe boottom loftsBacteria infections iin tthe
    vagina

  11. Fish xxxx adult gamesInerracial vdeos vodMature ten bjj tubeBangbus latina fuckedEmmmy
    pornstarNeppali flaash porn videoTom’s beach sex2011
    new nnude pics vennhessa hudgensLonng tgp moviesXxx mature wifeAduylt disney giftsJessica simpson cumsht
    photosAdult educarion iin berridn springs miAdul sian caam webVintage cap guns pricesBlwck gjrl withh smasll tits18 mobiule teen pornDovv charney
    sexualScrotum fuckTeacers fuciing gitls inn classroomRedtube shavesd arabBlog
    orn siteMuscle latexEnea drinkingg girlos pissAdult tonbgue tieBusgy impport
    models francine deeEroti short5th xxxSimpl artdul
    nude2 arult flash gamess comPovv nure seex vidsPristrate
    slow blowjobGett naked annd fuc mee pornDeset brast center
    tedmpe azVanckuve sex fantasyInflateable dogg cockHardcoe cartoonn havng
    sexSttockinged sgemale moviesRough grannmy sexKiren chegry upskirtTeen babbe fuckking back
    cockErtic ree sluttpuppy storyMeeting forr sexyElyanna esxcort erofic reviewsAdut
    edjcation inn brudgton maineRahel ecort llndon ontarioPorn staes fayeBest orgasm everBizarro dknt ddr fooledd free fdee pornPrstitute annd sexFlazsh ssex vireo maleGiirl tezch jac offNudde male menObama’s ggay lover fights backCumm eating wifeyTeeen eats like a skinnyGrerat porn video sharingSantonio holms nakedGayy menn usee off speculumMenn biini waxsBestt adulkt ltin escortsLaarge roups off nude womenEaasy too masturbatre toIndian femdm spankingGrezt
    esbian site https://xnxxmovs.cc/movs/amateur Free
    aanal porn galleriesdTeen shortfs picsGrany fuckinng grman shephardNivea shawy tpdd bikini bashHoww doo i chnt myselfNakdd piccs off jeniffer lopezLesbiasn seex
    petViideo post site adultFreee onlone pusxy
    videosTwoo drunk tens hqve sexAddult singyles dating
    mision ssouth dakotaNerdd nudce thumbsJacks asian adventure 3 screenshotsNudess a poppin videoNakesd dominican womenWhite wives fucoing blsck cpck barebackLesbian sgrapon tubeHumonngous
    rond titsGeek prn tubeAsian swqeet pussy free moviesIndex oof nudidt jpgMy wife scks dickNssx adultPornstar adranna devilleOrggy advanced guestbook 2.4.2Maturee open spreaad widePornn stars
    like it biig ritaWatch best sexx sscene videosLivve fre
    wweb xxxToosh 0 penisUseed fenders ffor a 1971 midgetLingerie galkery nude babe modelOldd
    woves having sexPamelaa frankliin nudeMixewd asianHouston gaay barbersBagton braqd pornSaan farancisco adukt book storeGetting
    rrid off caalouses oon botgtom of ball oof footWhoo thee
    fuck is mickAtllas breast imagingWatrch dirfty lahndry online hentaiUk mature women porno
    free filmsTeenn america mapsLeafn how tto upskirtNudde amaatuer sexx photosSexy girl strip videoMerijah arrie nakedLatin ldies
    tgpAmatuure stripper clipFree monster cock shemqle pornFrree homemjade cumshotPhpp pising
    pussyStoocking lesbian galleriesDirty bkonde slutsGallerry ggay photoFrancoise boufhhal nudeWhatt gene causes huge
    penis grouth

  12. With almost everything that seems to be building throughout this specific subject matter, your points of view are rather radical. Having said that, I beg your pardon, because I can not subscribe to your whole plan, all be it exciting none the less. It appears to us that your comments are generally not totally validated and in actuality you are generally your self not completely convinced of your assertion. In any event I did take pleasure in reading it.

  13. I?m impressed, I must say. Actually not often do I encounter a blog that?s each educative and entertaining, and let me inform you, you have hit the nail on the head. Your thought is outstanding; the problem is one thing that not enough people are speaking intelligently about. I’m very joyful that I stumbled throughout this in my search for one thing referring to this.

  14. One thing I have actually noticed is there are plenty of common myths regarding the lenders intentions whenever talking about home foreclosure. One myth in particular is that often the bank desires your house. The lending company wants your money, not the house. They want the cash they loaned you with interest. Averting the bank will draw the foreclosed final result. Thanks for your write-up.

  15. Thanks for your short article. I would also like to say that the health insurance brokerage service also works best for the benefit of the particular coordinators of any group insurance policies. The health insurance professional is given a directory of benefits wanted by individuals or a group coordinator. Exactly what a broker will is hunt for individuals or coordinators that best match those needs. Then he provides his suggestions and if all parties agree, the particular broker formulates a contract between the two parties.

  16. Way cool! Some very valid points! I appreciate you penning this post and the rest of the site is also really good.

  17. Thanks for your tips about this blog. One particular thing I would want to say is that often purchasing electronic devices items in the Internet is not new. In fact, in the past decades alone, the marketplace for online electronic devices has grown noticeably. Today, you can find practically any kind of electronic gizmo and product on the Internet, which include cameras and camcorders to computer pieces and game playing consoles.

  18. okmark your blog and check again here frequently. I’m quite certain I will learn many new stuff right here! Good luck for the next!

  19. I would like to thank you for the efforts you’ve put in writing this website. I am hoping the same high-grade blog post from you in the upcoming as well. Actually your creative writing abilities has inspired me to get my own site now. Really the blogging is spreading its wings rapidly. Your write up is a good example of it.

  20. This is very interesting, You’re a very skilled blogger. I have joined your feed and look forward to seeking more of your wonderful post. Also, I have shared your website in my social networks!

  21. Nice blog here! Also your web site loads up fast! What host are you using? Can I get your affiliate link to your host? I wish my website loaded up as quickly as yours lol

  22. Woah! I’m really enjoying the template/theme of this blog. It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and visual appearance. I must say that you’ve done a fantastic job with this. Additionally, the blog loads super quick for me on Safari. Outstanding Blog!

  23. Cool Some extremely valid points! I appreciate you writing this write-up and the rest of the site is really good.

  24. Definitely believe that which you stated. Your favorite reason seemed to be on the internet the simplest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they plainly don’t know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side-effects , people could take a signal. Will likely be back to get more. Thanks

  25. Excellent blog here! Also your site loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my web site loaded up as fast as yours lol

  26. My brother suggested I might like this blog. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks!

  27. Thanks for this excellent article. One other thing is that nearly all digital cameras arrive equipped with a zoom lens that enables more or less of your scene for being included by simply ‘zooming’ in and out. These changes in {focus|focusing|concentration|target|the a**** length are reflected while in the viewfinder and on huge display screen on the back of the particular camera.

  28. I?ll right away grab your rss as I can not find your e-mail subscription link or newsletter service. Do you’ve any? Kindly let me know so that I could subscribe. Thanks.

  29. My brother suggested I might like this web site. He was entirely right. This post truly made my day. You can not imagine just how much time I had spent for this info! Thanks!

  30. Hello there, just became alert to your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I?ll appreciate if you continue this in future. Numerous people will be benefited from your writing. Cheers!

  31. I don’t know whyether it’s just mme oor iff everyonne ele encounyering problems wioth
    yiur website. It appeawrs like sime oof the wrritten text on yourr posts aare runniong offf thee screen. Can sombody elsee please provide feedbafk andd llet me kmow iif thjis iis happening
    tto them as well? Thiis might bbe a issuue wiith myy wweb browser becuse
    I’ve hadd thijs haplpen before. Cheers xnxx

  32. I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It?s pretty worth enough for me. Personally, if all site owners and bloggers made good content as you did, the net will be a lot more useful than ever before.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>