A
A
Artem Artemov2015-11-18 22:24:58
Layout
Artem Artemov, 2015-11-18 22:24:58

How to remove indents?

Tell me how to remove the indents (marked in red) so that the text fits snugly against the border-
there is HTML:

<p class="p_con" id="p_top">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
            </p>

and there is CSS :
#p_top {
    padding: 0px;
    border: 1px solid black;
    margin: 0px;
}

ccba8cab5e674398abf983f224876650.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rad1us, 2015-11-19
@Vidaw

The first thing that came to my mind was to put p in a div and give the border to the div. And then set negative margins. Like here - codepen.io/anon/pen/rORvaV

N
Nikbes, 2015-11-18
@vanya_beseda

line-height: 0.8; in css
but then the indents between the lines will disappear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question