Removing top border from html table cells

I am at the initial stages of creating a website with a table that will be displayed on many pages. I successfully created the table as I would like, except for the gray border at the top of each cell. I just can't get rid of this.

[Website: http://www.randysrides.com/1970-chevrolet-camaro/] [1]

The HTML for the table is as follows:

<div class="spec_table">
<table>
<tbody>
<tr>
<td><strong>Engine:</strong> Wagner LS-3 (603 hp)</td>
</tr>
<tr>
<td><strong>Transmission:</strong> Bowler Tremec 5-speed</td>
</tr>
<tr>
<td><strong>Exhaust:</strong> Flowmaster Super 44 Mufflers</td>
</tr>
<tr>
<td><strong>Ignition: </strong>Crane</td>
</tr>
<tr>
<td><strong>Radiator: </strong>Be Cool</td>
</tr>
<tr>
<td><strong>Rear End: </strong>GM 12-bolt</td>
</tr>
<tr>
<td><strong>Suspension: </strong>AVCO/JME</td>
</tr>
<tr>
<td><strong>Brakes: </strong>Willwood</td>
</tr>
<tr>
<td><strong>Wheels: </strong>Billet Specialties</td>
</tr>
<tr>
<td><strong>Paint:</strong> BASF Waterborne "Grinch Green"</td>
</tr>
<tr>
<td><strong>Interior: </strong>Mark Millbrandt</td>
</tr>
<tr>
<td><strong>Seats: </strong>Recaro</td>
</tr>
<tr>
<td><strong>Sound System: </strong>Alpine</td>
</tr>
</tbody>
</table>
</div>

Then I have the following CSS:

.spec_table {width: 100%; max-width: 350px; margin-top: -31px;}
.spec_table table {margin-left: 0px;border-collapse:collapse;border: 0;}
.spec_table tr {border-left: 2px solid rgba(38,201,255,1);}
.spec_table td {margin-left: -20px; font-size: .9em; line-height: 1.1em;}

I just can't get rid of the light gray border at the top of each cell.

Any help would be greatly appreciated.

Thanks Jared

+4
source share
3 answers

You have a border style existing in your .css style

.entry-content tr td { border-top: 1px solid #eee; padding: 6px 24px; }

CSS

.spec_table td {
margin-left: -20px;
font-size: .9em;
line-height: 1.1em;
border-top: none !important;
}
+6

,

.entry-content tr td { border-top: 1px solid #eee; padding: 6px 24px; }

, .

CSS , , , , ?

, , . .

0

Add this to your CSS

.entry-content tr:first-child td:first-child {
border-top: none;
}

This uses pseudo-elements to target the first table tr, the first table td, so that there is no border-top then.

0
source

Source: https://habr.com/ru/post/1545111/


All Articles