{"id":14455,"date":"2012-07-30T21:01:08","date_gmt":"2012-07-30T13:01:08","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=14455"},"modified":"2025-04-04T01:11:27","modified_gmt":"2025-04-03T17:11:27","slug":"css3-box-sizing","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/","title":{"rendered":"A Look Into: CSS3 Box-sizing"},"content":{"rendered":"<p>Not too long ago, when we designed a <strong>box<\/strong> on a webpage using a <code>div<\/code> element, we typically set both width and height to <code>100px<\/code>, adding <code>10px<\/code> of <code>padding<\/code> and <code>10px<\/code> borders.<\/p>\n<pre>\r\n div {\r\n   width: 100px;\r\n   height: 100px;\r\n   padding: 10px;\r\n   border: 10px solid #eaeaea;\r\n }\r\n<\/pre>\n<p>This setup would cause browsers to increase the box\u2019s size to 140px. The total width or height, 140px, comprises the original <code>width\/height<\/code> plus twice the <code>padding<\/code> and twice the <code>border<\/code> thickness, calculated as <strong>100px [width\/height] + (2 x 10px [padding]) + (2 x 10px [border])<\/strong>.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg\" alt=\"CSS Box Model\" width=\"500\" height=\"300\"><\/figure>\n<p>However, there are times when we want our box to maintain a consistent size of <code>100px<\/code>, regardless of any padding or borders we add.<\/p>\n<p>To address this common challenge in web page layout design, we can utilize the CSS3 <code>box-sizing<\/code> property. This allows us to dictate how the <strong><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.w3.org\/TR\/CSS2\/box.html\">CSS box model<\/a><\/strong>.<\/p>\n<h2>Mastering box-sizing<\/h2>\n<p>The <code>box-sizing<\/code> property offers two choices: <code>content-box<\/code>, which is the default setting where the box model expands as previously described, and <code>border-box<\/code>. The latter option ensures the dimensions of the box are maintained as specified, with padding and borders included within the box\u2019s total width and height.<\/p>\n<pre>\r\ndiv {\r\n  width: 100px;\r\n  height: 100px;\r\n  padding: 10px;\r\n  border: 10px solid #eaeaea;\r\n  box-sizing: border-box;\r\n  -moz-box-sizing: border-box; \/* Firefox 1-3 *\/\r\n  -webkit-box-sizing: border-box; \/* Safari (old) *\/\r\n}\r\n<\/pre>\n<p>With <code>border-box<\/code>, a box set to 100px square, factoring in 10 pixels for padding and borders, effectively sizes its content to <code>60px<\/code> to keep the box\u2019s outer dimensions at <code>100px<\/code>. This calculation subtracts padding and borders from the overall dimensions, ensuring the box size remains constant.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-2.jpg\" alt=\"CSS box model with border-box\" width=\"500\" height=\"300\"><\/figure>\n<h2>Compatibility across browsers<\/h2>\n<p>The <code>box-sizing<\/code> property is well-supported across modern browsers, including Firefox 3.6+, Safari 3, Opera 8.5+, and Internet Explorer 8 and newer. Thus, if your site\u2019s audience primarily uses these or later versions, leveraging this property can enhance layout design significantly.<\/p>\n<pre>\r\nbox-sizing: border-box;\r\n-moz-box-sizing: border-box; \/* Firefox 1-3 *\/\r\n-webkit-box-sizing: border-box; \/* Safari *\/\r\n}\r\n<\/pre>\n<p>Implementing the above CSS snippet universally applies the <code>box-sizing<\/code> rule to all elements on your site, simplifying layout management and ensuring consistency across various components.<\/p>\n<h2>Practical Application<\/h2>\n<p>In this example, we\u2019ll illustrate the practical use of the <code>box-sizing<\/code> property by creating a straightforward navigation bar. This bar will contain five links, structured using the following HTML code:<\/p>\n<pre>\r\n&lt;ul&gt;\r\n  &lt;li&gt;&lt;a href=\"#\"&gt;Menu 1&lt;\/a&gt;&lt;\/li&gt;\r\n  &lt;li&gt;&lt;a href=\"#\"&gt;Menu 2&lt;\/a&gt;&lt;\/li&gt;\r\n  &lt;li&gt;&lt;a href=\"#\"&gt;Menu 3&lt;\/a&gt;&lt;\/li&gt;\r\n  &lt;li&gt;&lt;a href=\"#\"&gt;Menu 4&lt;\/a&gt;&lt;\/li&gt;\r\n  &lt;li&gt;&lt;a href=\"#\"&gt;Menu 5&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n<\/pre>\n<p>To enhance its appearance, we\u2019ll define a fixed width of <code>500px<\/code> for the navigation bar and set each link to <code>100px<\/code> wide. We\u2019ll align the list items horizontally and assign unique background colors to each link for visual distinction.<\/p>\n<pre>\r\nnav {\r\n  width: 500px;\r\n  margin: 50px auto 0;\r\n  height: 50px;\r\n}\r\nnav ul {\r\n  padding: 0;\r\n  margin: 0;\r\n}\r\nnav li {\r\n  float: left;\r\n}\r\nnav a {\r\n  display: inline-block;\r\n  width: 100px;\r\n  height: 100%;\r\n  background-color: #ccc;\r\n  color: #555;\r\n  text-decoration: none;\r\n  font-family: Arial, sans-serif;\r\n  font-size: 12pt;\r\n  line-height: 300%;\r\n  text-align: center;\r\n}\r\nnav li:nth-child(1) a {\r\n  background-color: #E9E9E9;\r\n  border-left: 0;\r\n}\r\nnav li:nth-child(2) a {\r\n  background-color: #E4E4E4;\r\n}\r\nnav li:nth-child(3) a {\r\n  background-color: #DFDFDF;\r\n}\r\nnav li:nth-child(4) a {\r\n  background-color: #D9D9D9;\r\n}\r\nnav li:nth-child(5) a {\r\n  background-color: #D4D4D4;\r\n  border-right: 0;\r\n}\r\n<\/pre>\n<p>Initially, our navigation appears standard.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/menu-box-size-1.jpg\" alt=\"Standard navigation appearance\" width=\"500\" height=\"250\"><\/figure>\n<p>Yet, challenges emerge upon introducing left or right borders to the links. This addition increases each link\u2019s width from <code>100px<\/code> to <code>102px<\/code>, unexpectedly extending the total width of the navigation beyond the intended <code>500px<\/code>.<\/p>\n<pre>\r\nnav a {\r\n  border-left: 1px solid #aaa;\r\n  border-right: 1px solid #f3f3f3;\r\n  box-sizing: border-box;\r\n  -moz-box-sizing: border-box;\r\n  -webkit-box-sizing: border-box;\r\n}\r\n<\/pre>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/menu-box-size-2.jpg\" alt=\"Navigation with overflow due to borders\" width=\"500\" height=\"250\"><\/figure>\n<p>To rectify this, implementing the <code>box-sizing<\/code> attribute ensures that the navigation\u2019s dimensions remain consistent, inclusive of border thickness.<\/p>\n<h2>Expand Your Knowledge<\/h2>\n<p>For those eager to delve further into CSS intricacies, here are some handpicked resources:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/\">Understanding the CSS Box Model<\/a> \u2013 A comprehensive guide by Tech Republic.<\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=308801\">Box-sizing bug in Firefox<\/a> \u2013 A detailed bug report on BugZilla.<\/li>\n<li><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.paulirish.com\/2012\/box-sizing-border-box-ftw\/\">Box-sizing FTW<\/a> \u2013 Insights by Paul Irish on the advantages of <code>box-sizing<\/code>.<\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and 10px borders. div { width: 100px; height: 100px; padding: 10px; border: 10px solid #eaeaea; } This setup would cause browsers to increase the box\u2019s size&hellip;<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392,352],"tags":[507,506,2016],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>A Look Into: CSS3 Box-sizing - Hongkiat<\/title>\n<meta name=\"description\" content=\"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Look Into: CSS3 Box-sizing\" \/>\n<meta property=\"og:description\" content=\"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2012-07-30T13:01:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-03T17:11:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg\" \/>\n<meta name=\"author\" content=\"Thoriq Firdaus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@tfirdaus\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Thoriq Firdaus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/\"},\"author\":{\"name\":\"Thoriq Firdaus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\"},\"headline\":\"A Look Into: CSS3 Box-sizing\",\"datePublished\":\"2012-07-30T13:01:08+00:00\",\"dateModified\":\"2025-04-03T17:11:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/\"},\"wordCount\":451,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/css3-box-sizing\\\/box-model-1.jpg\",\"keywords\":[\"CSS\",\"HTML\",\"HTML5 \\\/ CSS3 Tutorials\"],\"articleSection\":[\"Coding\",\"Web Design\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/\",\"name\":\"A Look Into: CSS3 Box-sizing - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/css3-box-sizing\\\/box-model-1.jpg\",\"datePublished\":\"2012-07-30T13:01:08+00:00\",\"dateModified\":\"2025-04-03T17:11:27+00:00\",\"description\":\"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/css3-box-sizing\\\/box-model-1.jpg\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/css3-box-sizing\\\/box-model-1.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/css3-box-sizing\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"A Look Into: CSS3 Box-sizing\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/e7948c7a175d211496331e4b6ce55807\",\"name\":\"Thoriq Firdaus\",\"description\":\"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.\",\"sameAs\":[\"https:\\\/\\\/thoriq.com\",\"https:\\\/\\\/x.com\\\/tfirdaus\"],\"jobTitle\":\"Web Developer\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/thoriq\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"A Look Into: CSS3 Box-sizing - Hongkiat","description":"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/","og_locale":"en_US","og_type":"article","og_title":"A Look Into: CSS3 Box-sizing","og_description":"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and","og_url":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2012-07-30T13:01:08+00:00","article_modified_time":"2025-04-03T17:11:27+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg","type":"","width":"","height":""}],"author":"Thoriq Firdaus","twitter_card":"summary_large_image","twitter_creator":"@tfirdaus","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Thoriq Firdaus","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/"},"author":{"name":"Thoriq Firdaus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807"},"headline":"A Look Into: CSS3 Box-sizing","datePublished":"2012-07-30T13:01:08+00:00","dateModified":"2025-04-03T17:11:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/"},"wordCount":451,"commentCount":4,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg","keywords":["CSS","HTML","HTML5 \/ CSS3 Tutorials"],"articleSection":["Coding","Web Design"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/","url":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/","name":"A Look Into: CSS3 Box-sizing - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg","datePublished":"2012-07-30T13:01:08+00:00","dateModified":"2025-04-03T17:11:27+00:00","description":"Not too long ago, when we designed a box on a webpage using a div element, we typically set both width and height to 100px, adding 10px of padding and","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/css3-box-sizing\/box-model-1.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/css3-box-sizing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"A Look Into: CSS3 Box-sizing"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/e7948c7a175d211496331e4b6ce55807","name":"Thoriq Firdaus","description":"Thoriq is a writer for Hongkiat.com with a passion for web design and development. He is the author of Responsive Web Design by Examples, where he covered his best approaches in developing responsive websites quickly with a framework.","sameAs":["https:\/\/thoriq.com","https:\/\/x.com\/tfirdaus"],"jobTitle":"Web Developer","url":"https:\/\/www.hongkiat.com\/blog\/author\/thoriq\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-3L9","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=14455"}],"version-history":[{"count":3,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14455\/revisions"}],"predecessor-version":[{"id":73539,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/14455\/revisions\/73539"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=14455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=14455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=14455"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=14455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}