How can I make a table border like a thin line?

How can I make a table border like a thin line?
I think we can use style="border-collapse: collapse"
but it seems to be not what I want....
mawinghoAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
LordOfPortsConnect With a Mentor Commented:
Below is another example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Table With Thin Border</title>
    
    <style type="text/css">
    
    table 
    {
        border-top:     1px solid #999999;
        border-left:    1px solid #999999;
    }
    
    td
    {
        border-right:   1px solid #999999;
        border-bottom:  1px solid #999999;
    }
    
    </style>
</head>
<body>
 
<table cellpadding="5" cellspacing="0">
 <tr>
  <td>Cell 1</td>
  <td>Cell 2</td>
 </tr>
 <tr>
  <td>Cell 3</td>
  <td>Cell 4</td>
 </tr>
</table>
 
</body>
</html>

Open in new window

ThinBorderTable.png
0
 
sajay_jCommented:
table, td { border:1px solid #ccc; } if it is correct.
Regards
Sajay.
0
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
compfixer101Commented:
<table border="1"> {table ans text here}</table>
0
 
arunavelaCommented:
table { border: thin solid } or table { border: 1px solid }
0
 
arunavelaCommented:
table { border: thin solid } and set the cellsapcing and padding is 0
0
 
compfixer101Commented:
it really depends on whether you want it done by CSS or by the actual table tag..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.