tags:

views:

125

answers:

2

css:

.item_fact{
     border-bottom:#CCCCCC 1px solid;
}

html:

<table>
  <tr class="item_fact">
    <td> hello </td>
    <td> world </td>
  </tr>
</table>

IE7 does not display the border-bottom, but firefox and chrome does! how can I hack this css? =) thx.

+4  A: 

the correct css syntax would be:

border-bottom: size style color;

So, in your case:

border-bottom: 1px solid #CCCCCC;

edit: actually, it seems TR doesn't act like it 'contains' the TD elements in IE7. One trick you can do is have the table collapse borders, then apply all TDs under .item_fact to have the border-bottom themselves.

Like this:

<html>
<head>
<style type="text/css">
table {
 border-collapse: collapse;
}
.item_fact td {
  border-bottom:1px solid #CCCCCC;
}
</style>
</head>
<body>
<table>
  <tr class="item_fact">
 <td> hello </td>
 <td> world </td>
  </tr>
</table>
</body>
</html>
Matt
A: 

Borders on rows are not supported in IE/css. You need to border the cells.

.item_fact td {
  border-bottom:1px solid #ccc;
}
cdm9002