Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to skip/insert half of a line height in html or asp.net aspx file?

Tags:

html

asp.net

I use <br /> to do a line break in an aspx file.

This gives me more line height than I want. Meaning too much blank space between the lines. How do I insert or skip just half of a line height in aspx or html?

BTW, I am using an asp:Label control on the following line if this info can be useful.

like image 520
user763554 Avatar asked Dec 03 '25 17:12

user763554


2 Answers

Try something like:

CSS

.half-line {
  line-height: .5em;
}

and then add <p class="half-line">&nbsp;</p> instead of your <br> tag

Or instead of using <br> tags, you could just set the margin-bottom on your <p> tags smaller.

like image 130
Scrimothy Avatar answered Dec 06 '25 10:12

Scrimothy


<SUP>&nbsp;</SUP>

Superscript adds a half-line above the line it is in.

like image 40
nrford100 Avatar answered Dec 06 '25 10:12

nrford100



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!