Set border to table tr, works in everything except IE 6 & 7

后端 未结 4 440
旧时难觅i
旧时难觅i 2020-12-08 15:30

I set the border for the table event_calendar tr to be red, it works in everything except IE 6 & 7. What is wrong with my CSS?

table#event_calendar tr {
         


        
4条回答
  •  情话喂你
    2020-12-08 15:46

    IE does not honor the border property for tags. However, there are workarounds by putting a top and bottom border around each cell, and using "border-collapse: collapse;" so there's no space between cells. I will refer to this resource here on the exact method, but it will essentially look like this for you (I haven't tested it myself, so I'm not sure if this is exactly right, but I think you can riff on it.)

    table#event_calendar {
        border-collapse: collapse;
        border-right: 1px solid red;
        border-left: 1px solid red;
    }
    
    table#event_calendar td, table#event_calendar th {
        border-top: 1px solid red;
        border-bottom: 1px solid red;
    }
    

提交回复
热议问题