Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:53:46+00:00 2026-06-02T04:53:46+00:00

I have this HTML table: <table width=1100 border=1 style=text-align:center; class=invoice> <tr><td>&nbsp;</td><td>&nbsp;</td><td>Amount Due</td><td>Amount Enc.</td></tr> <tr><td>&nbsp;</td><td>&nbsp;</td><td>CAD

  • 0

I have this HTML table:

<table width="1100" border="1" style="text-align:center;" class="invoice">

<tr><td>&nbsp;</td><td>&nbsp;</td><td>Amount Due</td><td>Amount Enc.</td></tr>
<tr><td>&nbsp;</td><td>&nbsp;</td><td>CAD <?php echo $key['remainingbalance']; ?></td><td>&nbsp;</td></tr>

</table>

with this CSS:

table.invoice, th.invoice, td.invoice{
    border: 1px solid black;
}

however it’s not styling my table, I am expecting all of the borders for the table, td and tr to be 1px solid black, why is this not working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:53:48+00:00Added an answer on June 2, 2026 at 4:53 am

    The border in your sample will only apply to the table.
    1) table.invoice — this refers to a table with the class “invoice”
    2) th.invoice — this refers to a header-cell with the class “invoice”
    3) td.invoice — this refers to a normal table-cell with the class “invoice”

    so 2 & 3 don’t apply, because you don’t have that class on your table cells.

    You could change the styles like this:

    table.invoice, .invoice th, .invoice td{
        border: 1px solid black;
    }
    table.invoice{border-collapse:collapse;} /* update following asker's comment */
    

    … then the border will apply to the header-cell and the normal cell.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html page: <body> <div class=hide1 style=width:1000px; height:1000px;> <table width=100% border=0
i have this html: <table style=width: 128px; border=0 cellspacing=0 cellpadding=0> <colgroup span=1><col span=2 width=64></col></colgroup>
I have this in HTML: <div class=dataBurst title=What is the Matrix?> <table align=center height=100%>
I have a HTML table like this: <table border=1> <tbody> <tr> <td><a href=# class=delete>DELETE
I have a HTML table like this: <table border=1> <tbody> <tr> <td><a href=# class=delete>DELETE
I have the following HTML: <table id=MwDataList class=data width=100% cellspacing=10px> .... <td class=centerText style=height:
I have this HTML with a table: <div class=currentDesignDiv style=margin-bottom:5px;> <div> <img alt=Thumbnail src=http://www.propertyware.com/templates/
I have an html table <table border=0 width=100%> <tr class=headerbg> <th width=5%> No </th>
Hi I have this HTML code <th scope=col class= style=width: 13px;> <div class=some-handle></div> <a
I have following HTML table: <form method=post action=update-table.php> <table class=table-data style=width: 960px;> <thead> <tr>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.