0

I'd like to put some space between the <p>s en the E's. But don't know how to do it without smashing my spacebar.

.footer_box p {
  display: inline-block;
}
<div id="footer_box">
  <p>Aantal M²:</p>
  <p>Schuren:</p>
  <p style="float:left;">Behandeling:</p>
  <p>E</p>
  <p>Afwerking:</p>
</div>
Mr. Polywhirl
  • 42,981
  • 12
  • 84
  • 132
J. Coderino
  • 209
  • 2
  • 11
  • you should not use p in this case .. consider span element – Temani Afif Jan 29 '19 at 12:56
  • But @temaniafif then everything goes next to eachother. And if i use P's they go under eachother like i need it to. You know a fix? – J. Coderino Jan 29 '19 at 12:58
  • use a `
    ` element after the `P`, thats what it was invented for, creating a new line. use a more correct element for the use case `P` is a Paragraph, which is not what you are representing. that way, you will not need to redefine the `P` element.
    – Rafael Herscovici Jan 29 '19 at 13:00
  • You have to add span inside of

    and

    to make space between elements
    – Niraj patel Jan 29 '19 at 13:02

2 Answers2

3

Add the E within a span inside the P tag and then add padding the the span tag like so:-

p span {
  padding-left: 40px
}
   <div id="footer_box">
    <p>Aantal M²:</p>
    <p>Schuren:</p>
    <p>Behandeling:<span>E</span></p>
    <p>Afwerking:</p>
   </div>
Web Nexus
  • 1,150
  • 9
  • 28
-1

use this method of html, i hope it will help you.

.footer_box p{
    display:inline-block;
}
  <div id="footer_box">
    <p>Aantal M²:</p>
    <p>Schuren:</p>
    <p>Behandeling: <span>E</span></p>  
    <p>Afwerking:</p>
   </div>
Mohit Gupta
  • 739
  • 1
  • 5
  • 16