locked
leaving space between 2 lines in html RRS feed

  • Question

  • User-1474096950 posted
    with reference to the thread https://forums.asp.net/t/2143344.aspx?convert+generated+html+to+pdf   
    used
    sb
    .Append("<tr><td colspan='4'></td></tr>");

    to leave space . if i need to leave 10 lines i need to use the above code 10 times is there any other way out
    Thursday, July 5, 2018 3:32 PM

All replies

  • User-1171043462 posted
    1. Add BR Tags
      sb.Append("<tr><td colspan='4'><br /><br /><br /><br /></td></tr>");
    Thursday, July 5, 2018 4:09 PM
  • User36583972 posted


    Hi svibuk,

    to leave space . if i need to leave 10 lines i need to use the above code 10 times is there any other way out

    You can also try to use the CSS line-height Property to set the line height for different <div>/<p>... elements. This can avoid repeated writing 10 times.

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
        <style>
            p.small {
                line-height: 0.7;
            }
    
            p.big {
                line-height: 1.8;
            }
        </style>
    
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <p>
                      is a paragraph with a standard line-height.<br/>    
                </p>
                <p class="small">
                    This is a paragraph with a smaller line-height.<br/>   
                </p>
                <p class="big">
                    This is a paragraph with a bigger line-height.<br/>
                </p>
            </div>
        </form>
    </body>
    </html>
    

    Best Regards,

    Yong Lu


    Friday, July 6, 2018 2:19 AM
  • User-414649453 posted

    use <\br> tag for line break

    and &nbsp; for space

    Thursday, July 12, 2018 7:53 AM