Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2327
  • Last Modified:

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....
0
mawingho
Asked:
mawingho
1 Solution
 
sajay_jCommented:
table, td { border:1px solid #ccc; } if it is correct.
Regards
Sajay.
0
 
compfixer101Commented:
<table border="1"> {table ans text here}</table>
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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
 
LordOfPortsCommented:
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
 
compfixer101Commented:
it really depends on whether you want it done by CSS or by the actual table tag..
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now