Click here to Skip to main content
14,977,910 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I tried to remove horizonal line from hr tag with below code.The same is working fine in Chrome,but not working in Outlook mail.




What I have tried:

<hr style='border:0;'> 
Posted
Updated 24-Feb-21 2:18am

1 solution

OUtlook mail, and any other mail utility, is not a browser.

They do not necessarily render all HTML, and more so, CSS.

That being said, you also need to check browser settings to make sure the email was marked as HTML vs RTF vs plaintext.

All that being said, setting the style of the hr element to border=0 does not actually guarantee that it will make it go away. It has default properties.[^] You really should just delete it if you don't want it - which is the most sensible way, is it not?
   
v2
Comments
Madhur Bakliwal 24-Feb-21 9:14am
   
Thank you for the response.
However i have to use that tag,so my line(statement) should not go into next line.Hence I am using hr tag here,and to remove the horizontal line it is not getting success here,apparently working fine in Chrome and IE.
W Balboos, GHB 24-Feb-21 9:21am
   
There are other ways in HTML to make a space:
Margins, for one, and <br> for another
Madhur Bakliwal 25-Feb-21 1:39am
   
Thank you again for your response,could you please brief on it with sample code
W Balboos, GHB 25-Feb-21 6:39am
   
Actually, no samples beyond what you got in the previous email: <br>. You need to dig in and figure it out - and thus learn from this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900