


Then click OK button, and all spaces between the selected. In the popped out Paragraph dialog box, under the Indents and Spacing tab, check the Dont add space between paragraphs of the same style option, see screenshot: 3. The best way is to explicitly control the margins and padding of elements that you use unless you are not concerned about the odd discrepancies that will occur. Select the paragraphs that you want to remove the spaces, click Home > Paragraph Settings launcher, see screenshot: 2. If you take the form element for example you will find that some browsers apply no styling to it while others give it a great big margin. Of course then we need to take into account the line-heights of each element but lets not go there right now On the Home tab, click the Line and Paragraph Spacing command.
Delete space between paragraphs html how to#
Padding doesn’t collapse as you quite rightly point out but as i stated in my post you will need to address the padding on both elements just like you need to address the margins on both elements (if any exist) to effect a complete removal of space. You will learn how to delete leading and trailing spaces in a cell, eliminate extra spaces between words, get rid of. Select the paragraph or paragraphs you want to format. However this is handled differently and incorrectly by some browsers and my advice still holds true either way ). Only the smallest margin collapses on elements (excluding floats) but there is also the compound collapsing of margins where nested elements (especially ul’s) are concerned. However the main point of my post is still valid and reffered to the standard html block level elements of document structure such as h1,h2,h3,h…, p,ul,ol,li, form,dl,dt,dd etc… All these elements may or maynot have varying amounts of margins/padding added and the only way to be sure you get what you need is to do it yourself The specs on default margins/padding are informative and not compulsory so UA’s are allowed to differ in some way (and most do). However that may not always be the case as UA’s may well decide to include defaults in the future (granted that this is unlikely but you never know ). However that clouds the issue a bit because a div is generic block level container and as such has no default padding and margins applied. In the popped out Paragraph dialog box, under the Indents and Spacing tab, check the Don't add space between paragraphs of the same style option, see screenshot: 3. Yes thats just the exception that proves the rule Select the paragraphs that you want to remove the spaces, click Home > Paragraph Settings launcher, see screenshot: 2. Now, these two blocks have moved closer to each other, haven’t they
