cssblockquote

Blockquote adds extra <br>


Why blockquote adds a extra br at the end of it and how can i avoid it? How can i remove that extra br that is added so all my lines are together>

.container-content .main-content .container-test pre {
  font-family: monospace;
  white-space: pre;
  word-break: break-all;
  color: #ececec;
  border: none;
  padding: 0;
  background-color: transparent;
}

blockquote {
  padding: 0px 10px 0px;
  margin: 0 0 0px;
  border-left: 3px solid #2471A3;
}
<div class="container-test">
<pre>
test test tesst
test test tesst
test test tesst
test test tesst
<blockquote>test test tesst
test test tesst
test test tesst
test test tesst</blockquote>
test test tesst
test test tesst
test test tesst
test test tesst
</pre>
</div>


Solution

  • set the display property of blockquote (please use better selector) as inline-block.

     .container-test pre {
      font-family: monospace;
      white-space: pre;
      word-break: break-all;
    }
    
    .container-test pre blockquote {
      padding: 0px 10px 0px;
      margin: 0 0 0px;
      border-left: 3px solid #2471A3;
      display:inline-block;
    }
    <div class="container-test">
    <pre>
    test test tesst
    test test tesst
    test test tesst
    test test tesst
    <blockquote>test test tesst
    test test tesst
    test test tesst
    test test tesst </blockquote>
    test test tesst
    test test tesst
    test test tesst
    test test tesst
    </pre>
    </div>