CSS Question

PichuSecretBase

Web Site Critique
  • 2,775
    Posts
    21
    Years
    Okay Lets say I have a table and it is

    Code:
    <table class="contenttb"><td><td>Content!</td><td>MORE CONTENT!</td></tr></table>
    and this in my CSS
    Code:
    .contenttb {
    font-family: Verdana;
    font-size: 10px;
    color: #000000;
    border:solid 1px #000000; }
    Why does my table border only go around the edge and not between colomns and rows?
     
    @_@ I just tested it out and this seems to work:

    Code:
    <table class="newtableclass"><td><td class="contenttb">Content!</td><td class="contenttb">MORE CONTENT!</td></tr></table>
    Code:
    .newtableclass { 
     	border-collapse: collapse; 
       }
      .contenttb {
       	font-family: Verdana;
       	font-size: 10px;
       	color: #000000;
       	border-width: 1px;
       	border-style: solid;
       	border-color: #000000;
       }

    ^_^; The TD tags need to have their borders set individually. The "border-collapse" attribute basically gets rid of the cellspacing in-between.
     
    Change this:

    Code:
    <table class="contenttb"><td><td>Content!</td><td>MORE CONTENT!</td></tr></table>

    to this:

    Code:
    <table class="contenttb"><tr><td>Content!</td><td>MORE CONTENT!</td></tr></table>

    too.
     
    Back
    Top