0

After reading this and this, I tried to apply a border on all my tr elements. If I do this:

$('table').find('tr td').css({'border':'15px solid red'});

it works, but I want it on the whole row. Thus I do this:

$('table').find('tr').css({'border':'15px solid red'});

But it doesn't work! Background-color and other CSS styles like this work:

$('table').find('tr').css({'color':'rgb(100,200,150)'});

What am I missing?

Community
  • 1
  • 1
Olivier Pons
  • 15,363
  • 26
  • 117
  • 213

1 Answers1

0

I found the answer in another (somewhat) different question here.

$('table')
    .css('border-collapse', 'collapse')
    .find('tr')
    .css({'border':'1px solid red'});
Community
  • 1
  • 1
Olivier Pons
  • 15,363
  • 26
  • 117
  • 213