{"id":20808,"date":"2015-06-09T17:29:09","date_gmt":"2015-06-09T11:59:09","guid":{"rendered":"https:\/\/tothenewco.pro\/blog\/?p=20808"},"modified":"2016-12-19T15:34:37","modified_gmt":"2016-12-19T10:04:37","slug":"difference-bw-displayinline-and-inline-block","status":"publish","type":"post","link":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/","title":{"rendered":"Difference b\/w Display:inline and inline-block"},"content":{"rendered":"<p>The CSS property &#8220;Display&#8221; is very useful and commonly used property of CSS which contains lots of values. In this blog we&#8217;ll talk about only &#8220;display:inline&#8221; and &#8220;display:inline-block&#8221;.<\/p>\n<p>We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below.<\/p>\n<h3 style=\"font-size: 22px !important;margin-bottom: 8px !important\">Display:inline<\/h3>\n<p>An inline element has no line break before and after of its neighbour elements and it allows HTML next to it.<br \/>\n1. Allows all side of padding<br \/>\n2. Allows only left and right side of margins, not top and bottom<br \/>\n3. You can&#8217;t set width and height of its element<br \/>\n4. Respect other elements to sit their left and right<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/06\/display-inline.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-20810\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/06\/display-inline.jpg\" alt=\"display-inline\" width=\"428\" height=\"213\" \/><\/a><\/p>\n<div style=\"height:30px\"><\/div>\n<h3 style=\"font-size: 22px !important;margin-bottom: 8px !important\">Display:inline-block<\/h3>\n<p>An inline-block element is placed as an inline element (on the same line as adjacent content). It looks like a inline element but actually its behaves as a block element and don&#8217;t force to line break<br \/>\n1. Allows all side of padding and margin<br \/>\n2. You can set width and height of its element<br \/>\n3. Respect other elements to sit their left and right<\/p>\n<p><a href=\"\/blog\/wp-ttn-blog\/uploads\/2015\/06\/display-inline-block.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-20811\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/06\/display-inline-block.jpg\" alt=\"display-inline-block\" width=\"428\" height=\"231\" \/><\/a><\/p>\n<p>As you can see in above given example, an inline-block (the button) will have taken its full space in all directions for padding and margins but inline (the button) will not allow it.<\/p>\n<p>Hope you will like it !<br \/>\nLinkedin<br \/>\nTwitter<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The CSS property &#8220;Display&#8221; is very useful and commonly used property of CSS which contains lots of values. In this blog we&#8217;ll talk about only &#8220;display:inline&#8221; and &#8220;display:inline-block&#8221;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline [&hellip;]<\/p>\n","protected":false},"author":51,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":8,"footnotes":""},"categories":[1],"tags":[245,1852,4842,379],"class_list":["post-20808","post","type-post","status-publish","format-standard","hentry","category-technology","tag-css","tag-front-end","tag-html","tag-ui"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"The CSS property &quot;Display&quot; is very useful and commonly used property of CSS which contains lots of values. In this blog we&#039;ll talk about only &quot;display:inline&quot; and &quot;display:inline-block&quot;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kapil Chotwani\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/\" \/>\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=\"Difference b\/w Display:inline and inline-block | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"The CSS property &quot;Display&quot; is very useful and commonly used property of CSS which contains lots of values. In this blog we&#039;ll talk about only &quot;display:inline&quot; and &quot;display:inline-block&quot;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/tothenewco.pro\/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=\"Difference b\/w Display:inline and inline-block | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The CSS property &quot;Display&quot; is very useful and commonly used property of CSS which contains lots of values. In this blog we&#039;ll talk about only &quot;display:inline&quot; and &quot;display:inline-block&quot;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/tothenewco.pro\/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\\\/difference-bw-displayinline-and-inline-block\\\/#article\",\"name\":\"Difference b\\\/w Display:inline and inline-block | TO THE NEW Blog\",\"headline\":\"Difference b\\\/w Display:inline and inline-block\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kapil\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-ttn-blog\\\/uploads\\\/2015\\\/06\\\/display-inline.jpg\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#articleImage\"},\"datePublished\":\"2015-06-09T17:29:09+05:30\",\"dateModified\":\"2016-12-19T15:34:37+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#webpage\"},\"articleSection\":\"Technology, css, front-end, HTML\\\/UI\\\/CSS, UI\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#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\\\/difference-bw-displayinline-and-inline-block\\\/#listItem\",\"name\":\"Difference b\\\/w Display:inline and inline-block\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#listItem\",\"position\":3,\"name\":\"Difference b\\\/w Display:inline and inline-block\",\"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\\\/kapil\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kapil\\\/\",\"name\":\"Kapil Chotwani\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/446eb8706b9d5f7e8454c08a5b7170382a4eac53ead85546444e66862834b658?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kapil Chotwani\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/\",\"name\":\"Difference b\\\/w Display:inline and inline-block | TO THE NEW Blog\",\"description\":\"The CSS property \\\"Display\\\" is very useful and commonly used property of CSS which contains lots of values. In this blog we'll talk about only \\\"display:inline\\\" and \\\"display:inline-block\\\". We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/difference-bw-displayinline-and-inline-block\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kapil\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/kapil\\\/#author\"},\"datePublished\":\"2015-06-09T17:29:09+05:30\",\"dateModified\":\"2016-12-19T15:34:37+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":"Difference b\/w Display:inline and inline-block | TO THE NEW Blog","description":"The CSS property \"Display\" is very useful and commonly used property of CSS which contains lots of values. In this blog we'll talk about only \"display:inline\" and \"display:inline-block\". We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline","canonical_url":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#article","name":"Difference b\/w Display:inline and inline-block | TO THE NEW Blog","headline":"Difference b\/w Display:inline and inline-block","author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/kapil\/#author"},"publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-ttn-blog\/uploads\/2015\/06\/display-inline.jpg","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#articleImage"},"datePublished":"2015-06-09T17:29:09+05:30","dateModified":"2016-12-19T15:34:37+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#webpage"},"isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#webpage"},"articleSection":"Technology, css, front-end, HTML\/UI\/CSS, UI"},{"@type":"BreadcrumbList","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","position":1,"name":"Home","item":"https:\/\/tothenewco.pro\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/tothenewco.pro\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#listItem","name":"Difference b\/w Display:inline and inline-block"},"previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#listItem","position":3,"name":"Difference b\/w Display:inline and inline-block","previousItem":{"@type":"ListItem","@id":"https:\/\/tothenewco.pro\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/tothenewco.pro\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/tothenewco.pro\/blog\/"},{"@type":"Person","@id":"https:\/\/tothenewco.pro\/blog\/author\/kapil\/#author","url":"https:\/\/tothenewco.pro\/blog\/author\/kapil\/","name":"Kapil Chotwani","image":{"@type":"ImageObject","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/446eb8706b9d5f7e8454c08a5b7170382a4eac53ead85546444e66862834b658?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kapil Chotwani"}},{"@type":"WebPage","@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#webpage","url":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/","name":"Difference b\/w Display:inline and inline-block | TO THE NEW Blog","description":"The CSS property \"Display\" is very useful and commonly used property of CSS which contains lots of values. In this blog we'll talk about only \"display:inline\" and \"display:inline-block\". We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/tothenewco.pro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/#breadcrumblist"},"author":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/kapil\/#author"},"creator":{"@id":"https:\/\/tothenewco.pro\/blog\/author\/kapil\/#author"},"datePublished":"2015-06-09T17:29:09+05:30","dateModified":"2016-12-19T15:34:37+05:30"},{"@type":"WebSite","@id":"https:\/\/tothenewco.pro\/blog\/#website","url":"https:\/\/tothenewco.pro\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/tothenewco.pro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"Difference b\/w Display:inline and inline-block | TO THE NEW Blog","og:description":"The CSS property &quot;Display&quot; is very useful and commonly used property of CSS which contains lots of values. In this blog we'll talk about only &quot;display:inline&quot; and &quot;display:inline-block&quot;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline","og:url":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/","og:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"Difference b\/w Display:inline and inline-block | TO THE NEW Blog","twitter:description":"The CSS property &quot;Display&quot; is very useful and commonly used property of CSS which contains lots of values. In this blog we'll talk about only &quot;display:inline&quot; and &quot;display:inline-block&quot;. We generally use both these properties to allow other elements to sit to their left and right but it has some difference which is explained below. Display:inline","twitter:image":"https:\/\/tothenewco.pro\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"20808","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","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":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","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 21:29:40","updated":"2024-02-29 08:49:24","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:\/\/tothenewco.pro\/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:\/\/tothenewco.pro\/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\tDifference b\/w Display:inline and inline-block\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/tothenewco.pro\/blog"},{"label":"Technology","link":"https:\/\/tothenewco.pro\/blog\/category\/technology\/"},{"label":"Difference b\/w Display:inline and inline-block","link":"https:\/\/tothenewco.pro\/blog\/difference-bw-displayinline-and-inline-block\/"}],"_links":{"self":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/20808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/users\/51"}],"replies":[{"embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/comments?post=20808"}],"version-history":[{"count":0,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/posts\/20808\/revisions"}],"wp:attachment":[{"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/media?parent=20808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/categories?post=20808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tothenewco.pro\/blog\/wp-json\/wp\/v2\/tags?post=20808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}