Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: CSS and tables

  1. #1
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and tables

    Hi! L-l-ook at my problem carefully:
    I want the main border of tables is removed and the other rows(<tr>) in the other rows should be "spaceless" and/or they should stick in each other. This is my code (correctness is rare).
    Code:
    <style>
    /*My website's bg-color is black*/
    table{border: black}
    tr,td{spacing: 0}
    </style>
    ALWAYS remember to validate your code

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    Try the border-collapse: collapse declaration on the table element. It removes all border‐spacing between the table’s cells and makes their borders overlap so that you don’t get doubled borders between adjacent cells.

    You don’t need to specify that borders should be removed though since the borders shouldn’t be there by default. Just in case though, you can use border-width: 0 or border-style: none.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    New Coder
    Join Date
    Dec 2006
    Location
    Bahrain
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Tyvms
    ALWAYS remember to validate your code


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •