{"id":38358,"date":"2016-07-28T12:48:27","date_gmt":"2016-07-28T07:18:27","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=38358"},"modified":"2016-07-30T06:05:14","modified_gmt":"2016-07-30T00:35:14","slug":"relative-fonts-the-liquid-state","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/","title":{"rendered":"Relative Fonts (The Liquid State)"},"content":{"rendered":"<p>In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser.<\/p>\n<p>It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is!<\/p>\n<p><strong>What is a Relative Font:<\/strong><\/p>\n<p>As defined above it is the fluid state of a font. Before understanding this , we need to go through the static state of a font.<\/p>\n<p><strong>Static Fonts :<\/strong> Fonts with values as px(pixel),in(inches) , pt(points), xx-small,x-small,medium,large,x-large,xx-large are static or absolute size of fonts.<\/p>\n<p>Absolute font size of an element depends only on the defined size(e.g 16px), irrespective of what is given in body or parent.<\/p>\n<p><strong>Relative Fonts :<\/strong> Unlike the static fonts, relative font sizes depends on the font size value of body as well as their parent element.<\/p>\n<p>Units for the relative fonts are: percent(%),em,rem,vh or vw.<\/p>\n<p><strong>Why should we care about Relative fonts:<\/strong><\/p>\n<p>A very obvious question can come in the mind, who is building the web architecture.<\/p>\n<p>Well, we have to! Especially when we are building a website for multiple resolutions.<br \/>\nConsider writing specific font size for each element on every different resolution. Irritated, right?<\/p>\n<p>Defining relative font in our styles sheet, can solve this absolutely.<\/p>\n<p><strong>How to use a relative font:<\/strong><\/p>\n<p>We generally define a basic font size in body as static fonts.<\/p>\n<p>For example:<\/p>\n<p><code>body<br \/>\n{ font-size:100%; }<\/code><\/p>\n<p>It renders the 100% font size of your default browser, that is generally 16px in static terms or 1em.<\/p>\n<p>Quick Formula(px to em conversion):<\/p>\n<p><strong>Ideally,<\/strong><\/p>\n<p><span style=\"color: #0000ff;\">1em of 100% = 16px ;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">1em of 62.5% = 10px ;<\/span><\/p>\n<p><span style=\"color: #0000ff;\">So at 62.5% in body Xpx = X\/10 em,<\/span><\/p>\n<p><span style=\"color: #0000ff;\">like 12px of 62.5% = 1.2 em ;<\/span><\/p>\n<p>We take 62.5% font-size in body for easy calculation.<\/p>\n<p><strong>The Em bug :<\/strong><\/p>\n<p>When em is used in inheritance , it creates a bug of increasing font size in child element.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p><code>div1 {font-size : 2em} and div1 &gt; p {font-size : 1.2em}<\/code>, the actual font size of <strong>div1 &gt; p<\/strong> will be <strong>2em+1.2em = 3.2em<\/strong>.<\/p>\n<p>To remove this bug we use either static font size in child element like px,pt or use rem or percent.<\/p>\n<p><strong>Rem(Rootem)<\/strong> calculates the font size directly from body.<\/p>\n<p>There are much more relative font sizes are in trend like Vh,Vw and more.<\/p>\n<p>Keep decorating your Webpage,Happy Coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a [&hellip;]<\/p>\n","protected":false},"author":904,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":5,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-38358","post","type-post","status-publish","format-standard","hentry","category-technology"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Arushi Shukla\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"Relative Fonts (The Liquid State) | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Relative Fonts (The Liquid State) | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#article\",\"name\":\"Relative Fonts (The Liquid State) | TO THE NEW Blog\",\"headline\":\"Relative Fonts (The Liquid State)\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/arushi-shukla\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2016-07-28T12:48:27+05:30\",\"dateModified\":\"2016-07-30T06:05:14+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#webpage\"},\"articleSection\":\"Technology\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#listItem\",\"name\":\"Relative Fonts (The Liquid State)\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#listItem\",\"position\":3,\"name\":\"Relative Fonts (The Liquid State)\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/arushi-shukla\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/arushi-shukla\\\/\",\"name\":\"Arushi Shukla\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#authorImage\",\"url\":\"https:\\\/\\\/newersworld-sf-static.tothenew.net\\\/prod\\\/profilePicFolder\\\/3c5664e5-918e-4b30-8f0a-8e6613fc6721_380-Arushi-Shukla-PROFILEPICTURE.jpeg\",\"width\":96,\"height\":96,\"caption\":\"Arushi Shukla\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/\",\"name\":\"Relative Fonts (The Liquid State) | TO THE NEW Blog\",\"description\":\"In context of web pages,HTML and CSS, \\u201cfont-size\\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \\u201cLiquid state\\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/relative-fonts-the-liquid-state\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/arushi-shukla\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/arushi-shukla\\\/#author\"},\"datePublished\":\"2016-07-28T12:48:27+05:30\",\"dateModified\":\"2016-07-30T06:05:14+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Relative Fonts (The Liquid State) | TO THE NEW Blog","description":"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a","canonical_url":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#article","name":"Relative Fonts (The Liquid State) | TO THE NEW Blog","headline":"Relative Fonts (The Liquid State)","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/arushi-shukla\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2016-07-28T12:48:27+05:30","dateModified":"2016-07-30T06:05:14+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#webpage"},"articleSection":"Technology"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/www.tothenew.com\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#listItem","name":"Relative Fonts (The Liquid State)"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#listItem","position":3,"name":"Relative Fonts (The Liquid State)","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/arushi-shukla\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/arushi-shukla\/","name":"Arushi Shukla","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#authorImage","url":"https:\/\/newersworld-sf-static.tothenew.net\/prod\/profilePicFolder\/3c5664e5-918e-4b30-8f0a-8e6613fc6721_380-Arushi-Shukla-PROFILEPICTURE.jpeg","width":96,"height":96,"caption":"Arushi Shukla"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/","name":"Relative Fonts (The Liquid State) | TO THE NEW Blog","description":"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/arushi-shukla\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/arushi-shukla\/#author"},"datePublished":"2016-07-28T12:48:27+05:30","dateModified":"2016-07-30T06:05:14+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Relative Fonts (The Liquid State) | TO THE NEW Blog","og:description":"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a","og:url":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Relative Fonts (The Liquid State) | TO THE NEW Blog","twitter:description":"In context of web pages,HTML and CSS, \u201cfont-size\u201d is a very basic property, which defines the size or height of text on web browser. It is certainly not a point of discussion, but the \u201cLiquid state\u201d of it definitely is! What is a Relative Font: As defined above it is the fluid state of a","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"38358","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":"","og_description":"","og_object_type":"blog","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":"","og_article_tags":"","twitter_use_og":false,"twitter_card":"summary","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-29 14:34:12","updated":"2024-02-29 09:16:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tRelative Fonts (The Liquid State)\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Technology","link":"https:\/\/www.tothenew.com\/blog\/category\/technology\/"},{"label":"Relative Fonts (The Liquid State)","link":"https:\/\/www.tothenew.com\/blog\/relative-fonts-the-liquid-state\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/38358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/904"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=38358"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/38358\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=38358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=38358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=38358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}