Rauf
Rauf

Reputation: 12852

hide cells border using css

I want to hide border of cell of a table . enter image description here

How to do it using css ? As it shows, I need to hide the marked borders (as in third and second rows).

Upvotes: 1

Views: 11456

Answers (5)

Poomcyber
Poomcyber

Reputation: 41

try this.

table {
border: 1px solid black;
width:100%;
border-collapse:collapse;
}

Upvotes: 1

Chirag Pareek
Chirag Pareek

Reputation: 111

try

td.col1
{ 

   border-left:0px;

}

Upvotes: 1

dmedvinsky
dmedvinsky

Reputation: 8356

<style>
table {
    border: 1px solid black;
    width:100%;
}
table tr {
    border: 1px solid black;
}
table th {
    border: none;
}
</style>

<table>
  <thead>
    <tr>
      <th class="col1">1</th>
      <th class="col2">2</th>
      <th class="col3">3</th>
    </tr>
  </thead>
</thead>

See here: http://jsfiddle.net/AhHFP/

Upvotes: 2

Mr.T.K
Mr.T.K

Reputation: 2356

try this

border-collapse:collapse;

Upvotes: 2

albert
albert

Reputation: 8153

i'm assuming thats a table? without markup, its kinda hard but set your table to table{border-collapse: collapse;} http://reference.sitepoint.com/css/border-collapse

Upvotes: 0

Related Questions