Guest Paul Alexander Posted October 4, 2021 Share Posted October 4, 2021 I'm trying to add a table with a border, but without and 'edges' around the cells. I've added this html: <html> <head> <style> table { border: 1px solid black; } </style> </head> <body> Which, when I open it in Chrome looks like this: Which is exactly what I want... However, if I put the same HTML in the email editor in Hornbill I get this (with no border around the table): Any ideas how to get this to work in the email editor please?! thanks Link to comment Share on other sites More sharing options...
Victor Posted October 4, 2021 Share Posted October 4, 2021 @Paul Alexander I don't think the template editor (using CKEditor) knows about CSS table border (which is what you are using there)... I would say have a table wrapper for all the above using a <table border="1"> tag.... so basically you have: <table border="1"> <tr><td> ... all the table you have there ... </td></tr> </table> Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 4, 2021 Share Posted October 4, 2021 Hi @Victor Thanks for that, but I now get (which has all of the cells outlined rather than just the table border): With this code: <table border="1"> <tbody> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>80</td> </tr> </tbody> </table> Link to comment Share on other sites More sharing options...
Victor Posted October 4, 2021 Share Posted October 4, 2021 @Paul Alexander I meant the bordered table like a wrapper for your table... so basically this: <table border="1"> <tr><td> <table> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>80</td> </tr> </table> </td></tr> <table> If you don't like how the border="1" looks like you can do a style inside the table tag, like this: <table style="border: 1px solid black"> which makes the border more thin... Link to comment Share on other sites More sharing options...
Victor Posted October 4, 2021 Share Posted October 4, 2021 Actually, I think you can have the CSS style inside the table tag so there won't be a need for the table wrapper: <table style="border: 1px solid black; border-collapse: collapse;"> <tr> <th>Firstname</th> <th>Lastname</th> <th>Age</th> </tr> <tr> <td>Jill</td> <td>Smith</td> <td>50</td> </tr> <tr> <td>Eve</td> <td>Jackson</td> <td>94</td> </tr> <tr> <td>John</td> <td>Doe</td> <td>80</td> </tr> </table> Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 4, 2021 Share Posted October 4, 2021 Cheers @Victor that's done it.... Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 5, 2021 Share Posted October 5, 2021 Actually...sorry, that's NOT done it (not in the Hornbill email function in a ticket anyway - although if I copy and paste the same code into an html doc and open it in Chrome, then it DOES work) So....if I use this code: <table style="border: 1px solid black; border-collapse: collapse; width:500px;"> <tbody> <tr> <td><img height="120px" src="https://vcukprodhornbillimages.z33.web.core.windows.net/Images/Main/BuildingNewStarterEmail/Steve.png" style="margin-left: 12px; margin-right: 12px; float: left; width: 102px; height: 120px;" width="102px" /></td> <td><span style="font-size:11pt"><span style="vertical-align:baseline"><span style="font-family:Calibri,sans-serif"><b><i>Steven Tideswell</i></b> (Head of Business Excellence and Sustainability) </span></span></span><br /> <span style="font-size:11pt"><span style="vertical-align:baseline"><span style="user-select:text"><span style="-webkit-user-drag:none"><span style="-webkit-tap-highlight-color:transparent"><span style="overflow-wrap:break-word"><span style="font-kerning:none"><span style="font-family:Calibri,sans-serif">Sustainability Specialist, Viewpoint for Projects Virtuoso, PowerProject Pundit </span></span></span></span></span></span></span></span><br /> </td> <td> </td> </tr> <tr> <td> </td> <td><span style="font-size:11pt"><span style="vertical-align:baseline"><span style="font-family:Calibri,sans-serif"><b><i>Lizzie Featherstone</i></b> (Business Excellence Manager)</span></span></span><br /> <span lang="EN-US" style="font-size:11.0pt"><span style="font-family:"Calibri",sans-serif">Queen of Quality, Field View Fanatic, Temporary Works Wizard</span></span></td> <td><img height="118px" src="https://vcukprodhornbillimages.z33.web.core.windows.net/Images/Main/BuildingNewStarterEmail/Lizzie.png" style="margin-left: 12px; margin-right: 12px; float: left; width: 101px; height: 118px;" width="101px" /></td> </tr> <tr> <td><img height="107px" src="https://vcukprodhornbillimages.z33.web.core.windows.net/Images/Main/BuildingNewStarterEmail/Dave.png" style="margin-left: 12px; margin-right: 12px; float: left; width: 115px; height: 107px;" width="115px" /></td> <td><span style="font-size:11pt"><span style="vertical-align:baseline"><span style="font-family:Calibri,sans-serif"><b><i>Dave Parry</i></b> (Business Tools Manager) </span></span></span><br /> <span lang="EN-US" style="font-size:11.0pt"><span style="font-family:"Calibri",sans-serif">PowerBI Pro, Data Devotee, Technology and Hardware Hotshot</span></span> </td> <td> </td> </tr> <tr> <td> </td> <td><span style="font-size:11pt"><span style="vertical-align:baseline"><span style="font-family:Calibri,sans-serif"><b><i>Victoria Vickers</i></b> (Business Excellence Advisor) </span></span></span><br /> <span style="font-size:11pt"><span style="vertical-align:baseline"><span style="user-select:text"><span style="-webkit-user-drag:none"><span style="-webkit-tap-highlight-color:transparent"><span style="overflow-wrap:break-word"><span style="font-kerning:none"><span style="font-family:Calibri,sans-serif">MSite Maestro, First-class Footprint-er, Awesome Advisor </span></span></span></span></span></span></span></span></td> <td><img height="118px" src="https://vcukprodhornbillimages.z33.web.core.windows.net/Images/Main/BuildingNewStarterEmail/Victoria.png" style="margin-left: 12px; margin-right: 12px; float: left; width: 101px; height: 118px;" width="101px" /></td> </tr> </tbody> </table> and send an email with this code in it from Hornbill, I get THIS (notice the lines separating the boxes): Yes if I open the same in Chrome, I get this (with NO separating lines): Any idea how to get the one WITHOUT the separating lines, but WITH the border using the Hornbill email editor please?! Link to comment Share on other sites More sharing options...
Victor Posted October 5, 2021 Share Posted October 5, 2021 Just use the table wrapper then... Also, I trust the above names are fictitious, right? Link to comment Share on other sites More sharing options...
Steve Giller Posted October 5, 2021 Share Posted October 5, 2021 Or put a border: none style on the TD attributes. Link to comment Share on other sites More sharing options...
Guest Paul Alexander Posted October 5, 2021 Share Posted October 5, 2021 Thanks for the suggestions...I've now tried both of those, and the email looks ok in the editor, and also when I open using Chrome, but when I send the email from a request, then the border has disappeared. I've just tried sending it to my hotmail address, and it DOES show correctly there, so it looks like this problem is an Outlook problem.... so basically I've been barking p the wrong tree by the sounds of it. Unless you have any other ideas, I think I can put this one to bed..... thanks Link to comment Share on other sites More sharing options...
Victor Posted October 5, 2021 Share Posted October 5, 2021 3 hours ago, Paul Alexander said: Unless you have any other ideas On this topic or in, like, general? ... if the later... well... Link to comment Share on other sites More sharing options...
samwoo Posted October 6, 2021 Share Posted October 6, 2021 Only other thing I can suggest trying is not using the generic border: element, but using the individual ones... <table style="border-width: 1px; border-color: #000000; border-style: solid; border-collapse: collapse"> Using the hex code of the colour will ensure compatibility across, as in some rare cases using "black" will not work (but I've yet to come across this). Outlook should be able to handle borders in a html table, I'm pretty sure it does... But then again there could be an admin-controlled outlook setting that I'm not aware of (that you may have) that's prevent it from working (though it doesn't really make sense if that's the case). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now