<?xml version="1.0" encoding="utf-8"?>

<feed xmlns="http://www.w3.org/2005/Atom">
<title>Tyler Cipriani: CSS display inline-block Extra Margin/Space</title>
<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/"/>
<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comments.atom" rel="self" type="application/atom+xml"/>
<author>

<name>Tyler Cipriani</name>

</author>

<rights type="html" xml:lang="en">

	<a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike License</a>
	Copyright © 2017 Tyler Cipriani

</rights>


<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/</id>

<subtitle type="html">Tyler Cipriani</subtitle>
<generator uri="http://ikiwiki.info/">ikiwiki</generator>
<updated>2018-06-13T19:34:11Z</updated>
<entry>
	<title>comment 1</title>

	<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comment_1_1f7f1cdbfd3fce90e72c6453ee617f08/</id>

	<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/#comment-f5251e8cb026df88874f71418b7374ac"/>

	<author><name>bestdenis2008</name></author>





	<updated>2018-06-13T19:34:11Z</updated>
	<published>2013-11-11T06:39:14Z</published>


	<content type="html" xml:lang="en">
	&lt;blockquote&gt;
&lt;p&gt;Second, directly address the space by setting a negative right margin or negative&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;It’s a font-dependent solution, isn’t it?&lt;/p&gt;


	</content>



</entry>
<entry>
	<title>comment 2</title>

	<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comment_2_cad18998d316750ce8863b50acac3fc5/</id>

	<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/#comment-9380795cb676a2ac0fdc250d8c388adf"/>

	<author><name>thcipriani</name></author>





	<updated>2018-06-13T19:34:11Z</updated>
	<published>2013-11-11T06:50:42Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;Yezzur, that solution will depend on the font-size of the parent container. An easier solution might be to just set font-size: 0; on the parent container.&lt;/p&gt;
&lt;p&gt;The more I play with inline-block, the more I like the comment based solution.&lt;/p&gt;
&lt;p&gt;You’ll see more solutions in that CSS Tricks article I have linked up.&lt;/p&gt;


	</content>



</entry>
<entry>
	<title>comment 3</title>

	<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comment_3_888e4deeb0cb19e5a356b5211dafad3f/</id>

	<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/#comment-86b9551a08bc5f3521980516dec7564c"/>

	<author><name>guest</name></author>





	<updated>2018-06-13T19:34:11Z</updated>
	<published>2014-01-24T14:29:22Z</published>


	<content type="html" xml:lang="en">
	or even better, set font-size: 0px on the parent div

	</content>



</entry>
<entry>
	<title>comment 4</title>

	<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comment_4_76ca8273799334281d238c9056e25315/</id>

	<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/#comment-1b63b5eace1bbf9e11c1b47385b2cadf"/>

	<author><name>aayix</name></author>





	<updated>2018-06-13T19:34:11Z</updated>
	<published>2014-04-24T00:45:16Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;Yes Guest, font size 0px is required if you want to display the inline-block elements aligned to center. if u have text in the inner elements u’ll need to set the font size for those back again&lt;/p&gt;


	</content>



</entry>
<entry>
	<title>comment 5</title>

	<id>https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/comment_5_731bb409539a922da91d93dc3b169f44/</id>

	<link href="https://tylercipriani.com/blog/2012/08/01/display-inline-block-extra-margin/#comment-7a1fa2403640b942cfa83fa5073c09bb"/>

	<author><name>foo</name></author>





	<updated>2018-06-13T19:34:11Z</updated>
	<published>2015-01-06T15:32:35Z</published>


	<content type="html" xml:lang="en">
	&lt;p&gt;Two alternatives:&lt;/p&gt;
&lt;ol type=&quot;1&quot;&gt;
&lt;li&gt;&lt;p&gt;set font-size: 0 on the immediate parent and redefine the font-size of the affected (inline-block) children&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;just use float: left. display: block is redundant (as it’s inferred from floating)&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


	</content>



</entry>

</feed>
