Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Table-row border is invisible

I'm using the bordered table class to style a table.

However, for some of the rows, I need to change the left-border of a table cell yet retain the appearance of a border around the whole table.

To do this, I have tried to re-style the table cell left-border and add a left-border to the table row.

I can remove the table cell left-border, however the new table row left-border is invisible.

.table tr.topic_row {
    border-left: 3px solid red;
}

.table td.topic_title {
    border-left: none;
}

You can see that the table-row border-appears to be invisible: http://i.stack.imgur.com/M5lsO.png

And yet it should be there: http://i.stack.imgur.com/crMQA.png

Any advice on how i can get the table row border to be visible would be greatly appreciated :)


Edit for clarification:

The issue here is, why isn't the table row border showing. Even though it should be there it isn't.

like image 680
Haz_ah Avatar asked Nov 02 '12 23:11

Haz_ah


People also ask

How can you make the table border visible?

So, if you're seeing invisible or non-colored spaces between your tds, try adding the cellspacing="0" attribute to your table tag.

Why is my table border not showing in HTML?

If you've set the shorthand border property in CSS and the border is not showing, the most likely issue is that you did not define the border style. While the border-width and border-color property values can be omitted, the border-style property must be defined. Otherwise, it will not render.

How do I make table borders visible in CSS?

The BORDER attribute of the <TABLE> tag allows you to assign a thickness (in pixels) to the border lines. To make a table with a border of 2 pixels, just add BORDER=”2″ to the <TABLE> tag. To make an invisible border, set the BORDER attribute to 0.

How do you make a table border visible in HTML?

To create table border in HTML, the border attribute was used. But the introduction of HTML5, deprecated the border tag. Create table border using the CSS property border. Set table border as well as border for <th> and <td>.


1 Answers

Try this:

.table tr.topic_row td {
    border-left: 3px solid red;
}

.table td.topic_title {
    border-left: none;
}
like image 125
Jakub Hnízdil Avatar answered Oct 05 '22 09:10

Jakub Hnízdil