Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

CSS and border-collapse property

I can't seem to get the border-collapse property to work on my tables. Basically, I should be able to specify a border and border-collapse: collapse on a table and this border will be applied to all cells. But I can't get it to work - any ideas? Here's an example:

<table width="300" 
  style="border: 1px solid black; border-collapse: collapse">
  <tr>
    <th>&nbsp;</th>
  </tr>
  <tr> 
    <td>this cell should have a top border<td>
  </tr>
</table>

And here's that same table without the HTML escaped:

 
this cell should have a top border

Posted in The Web at Dec 29 2002, 06:58:14 AM MST 3 Comments
Comments:

I could be mistaking but by my understanding you are asking too much from the border-collapse style. I think you still have to define the border on the cells. Try this for example :
<table width="300" border="0" style="border-collapse: collapse"> <tr> <th style="border: 1px solid black">&amp;nbsp;</th> </tr> <tr> <td style="border: 1px solid black">this cell should have a top border</td> </tr> </table> If I'm wrong, I hope someone will correct me.

Posted by Danman on December 29, 2002 at 10:32 PM MST #

Note that if you need the same border for all cells you better put the border style into the <tr> tag

Posted by Danman on December 29, 2002 at 10:42 PM MST #

Yeah, I've done it on the cells to get my desired behavior, but I swear that I've seen this work where there's only one border defined, and it "collapses" onto all the cells. Maybe it works with XHTML compliance turned off or something.

Posted by Matt Raible on December 30, 2002 at 03:44 AM MST #

Post a Comment:
  • HTML Syntax: Allowed