Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

HTML Table & style sheets

Options
  • 05-12-2005 12:26pm
    #1
    Registered Users Posts: 7,468 ✭✭✭


    Hello,

    I need to customise the border on my html table. Basically I want to drop the lines at either end of the table (see screen grab). Could somebody tell me how to do that? BTW the screengrab is an asp.net datagrid.

    E.P.


Comments

  • Registered Users Posts: 2,157 ✭✭✭Serbian


    When you say you want to drop the lines at either end of the table, do you mean the lines between the table cells?


  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    You can specify borders for TD elements which will acheive what you want, but the CSS is a little messy. From what I see there, you'd need two CSS elements:

    TD.firstRowAndLastCol - which has a single border-bottom attribute and is applied to the four cells at the top of the table and to the fourth column in all rows.
    TD.normalColumn - which has the border-bottom and border-right attributes set, and is applied to the first three columns on all rows.

    If you set the table to have zero cell spacing and just add some padding on the TD element, it should work OK.


Advertisement