Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<tr>-borders doesn't appear in outlook

I am having some trouble with my HTML tables in Outlook 2007+. All borders on my <tr>-elements are not showing up!

During development, I use html-files and .css-files. I then use a tool to merge the two together.

when merged, Chrome opens the html-file like this: table working in chrome

However, when I send the mail as an html-mail, Outlook displays it like this: table not working in outlook 2007+

After merging, all my <tr>-elements look like this:

<tr style="border-bottom: 1px solid #caecf0;"></td>

Do any of you know why?


Also, if anyone knows why the table footer is bigger than the header (they have the exact same styling) in outlook, please let me know ;-)

like image 909
Søren Lorentzen Avatar asked Jan 13 '23 06:01

Søren Lorentzen


1 Answers

You can't apply a border to a table row. You should apply it to the table cell

<td style="border-bottom: 1px solid #caecf0;"></td>

It's impossible to say why your table row tags are being broken without seeing your html but I would guess that you haven't closed the tags properly or the tool you are using to inline your CSS is rubbish

like image 144
Turnip Avatar answered Jan 14 '23 19:01

Turnip