Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to reduce the gap cause <br>

How can i reduce the "gap" or the "space" cause by the <br> on this CSS because it is too much …
also it is really noticeable on actual web browser on PC so here’s a live demo
thank you ..

.alert {
  margin: auto;
  width: 50%;
  padding: 3px 10px 3px 40px;
  border: 2px solid black;
  border-radius: 5px;
  background-color: Tomato;

  font-family: Arial, Verdana, Helvetica, Tahoma, Trebuchet, sans-serif;
  font-size: 16px;
  color: black;
  font-weight: bold;
  font-style: normal;
  letter-spacing: 1.5px;
  text-align: left;
  line-height: 1.5;
  display: block;
}
<div class="alert">You must read and agree to the Terms and Conditions agreement. </div><br>
<div class="alert">That email is already connected to an account!</div>

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

You shouldn’t really be using line breaks for this purpose. Just add a bottom margin to the .alert class and remove the line break.

<div class="alert">You must read and agree to the Terms and Conditions agreement. </div>
<div class="alert">That email is already connected to an account!</div>

.alert {
  margin: 0 auto 5px auto;
  width: 50%;
  padding: 3px 10px 3px 40px;
  border: 2px solid black;
  border-radius: 5px;
  background-color: Tomato;

  font-family: Arial, Verdana, Helvetica, Tahoma, Trebuchet, sans-serif;
  font-size: 16px;
  color: black;
  font-weight: bold;
  font-style: normal;
  letter-spacing: 1.5px;
  text-align: left;
  line-height: 1.5;
  display: block;
}

https://jsfiddle.net/74qaxr2z/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading