5

Yes, html emails are bad but I have to send html newsletter to my a list of clients. Most of them use Hotmail.

Is it possible to add a CSS border around a <table> / <div> element?

<div style="border:1px solid #000000;">BORDER</div> doesn't work

Eeyore
  • 2,126
  • 7
  • 33
  • 49

4 Answers4

10

Looks like the best option is creating a table within a table:

<table bgcolor="#ACD13C" width="100%" cellpadding="2" cellspacing="0"><tr>
                                            <td><table bgcolor="#ffffff" width="100%" cellpadding="0" cellspacing="0">
                                               <tr>
                                                 <td style="font-weight: normal; font-size: 0.9em; color: #000000; font-family: Arial,helvetica,sans; padding:0px; text-align:left;" width="400">Text goes here</td>
                                                </tr>
                                            </table></td></tr></table>

Hotmail just doesn't like borders...

Ed H
  • 101
  • 1
  • 4
7

try to use

border="1"
bevacqua
  • 47,502
  • 56
  • 171
  • 285
3

try to use

<div style="border:1px solid black;">Hola</div>

if it works

hkadejo
  • 162
  • 5
0

One way to avoid specifying for a generic name like "black" or a shortened version of the hex color (like "#000", which does not always work) is to specify each element seperately like so:

<table style="border-style:solid; border-width:1px; border-color:#000000;"><tr><td>....</td></tr></table>
neuroxik
  • 5
  • 2