Sometimes there comes a white-space between two inline-block elements which is neither a margin nor padding and should be removed..So here's the solution tha. Fighting the Space Between Inline Block Elements | CSS-Tricks. How to Set Space Between Flexbox Items - W3docs Two more options based on CSS Text Module Level 3 (instead of white-space-collapsing:discard which had been dropped from the spec draft): word-spacing: -100%; In theory, it should do exactly what is needed — shorten whitespaces between 'words' by the 100% of the space character width, i.e. The inline-block value is incredibly useful when wanting to control margin and padding on "inline" elements without the need to `block and float` them. 4 elements with a width of 25% and a display of inline-block, should all appear on the same line. empty space between each button. How to Remove White Space Under an Image Using CSS The divs with dynamic content have different heights and they create white space below them and take the height of the highest div in the row. css - Delete white space between divs - Stack Overflow inline-block margin reduce distance between row. The dropdown menu also shows up 15px below. If an image is used in the #header instead of text, you may want to remove the padding. #r1, #r2 { padding:0; } If you use Firefox get the add-on called firebug so you can see all the styling for each element. A div is a tag used in CSS to differentiate the different elements, which may include images, text content anchors, etc. Answer (1 of 3): You can't delete the spaces between div's using class row, as the row only adds left and right margins. One solution would be to replace the 16px top and bottom margin with padding: ul { margin-top: 0; margin-bottom: 0; padding-top: 16 px; padding-bottom: 16 px; } This will resolve this particular issue but you may encounter it for other tags such as p as you add them. How To Remove The White Space / Gaps In a Justified . How to remove the space between two Divs? Another way would be to simply get rid of the spaces between the divs: However, that's not always the case. css - Remove "whitespace" between div element - Stack Overflow Syntax: parent-element{ font-size:0px;} parent-element child-element{ display:inline-block; font-size:Required font size;} 4 . Message Too Old, No Replies FF unwanted white space between inline divs . The space between the two sections is occupied by text in this #copyright paragraph, but the text is invisible because it's color is white (inherited from body) and it sits on a white background. Gotta love IE! 1. Now, if the divs are meant to be one on top of the other, then the distance that can be set between them is vertical and can be done by either adding to margin-bottom to the top div or adding to margin-top of the second div as follows: .div-top { margin-bottom: 30px; } .div-bottom { margin-top: 25px; } In the case where the divs are two column .