2015-12-27 2 views
1

Я хочу, чтобы разделитель границы между ячейками таблицы будет половина его высотаКак установить границы таблицы меньше высоты ячейки

см Предварительный рис: enter image description here

Вот скрипка ссылка:

Fiddle link

#details_gdr { 
    height: 50px; 
    line-height: 25px !important; 
    margin-top: 3px; 
} 

#details_gdr tbody tr:not(:last-child) { 
    height: 25px; 
    border-bottom: 1px solid #D0E0EA; 
} 

#details_gdr tbody tr th:not(:last-child) { 
    border-right: 1px solid #D0E0EA; 
} 

#details_gdr tbody tr th { 
    width: 28px; 
    text-align: center !important; 
} 
+0

передать этот http://stackoverflow.com/questions/5664057/border-height-on-css – pratikpawar

ответ

2

вот ваше решение.

#details_gdr { 
    height: 50px; 
    line-height: 25px !important; 
    margin-top: 3px; 
    border-collapse: collapse; 
} 

#details_gdr tbody tr:not(:last-child) { 
    height: 25px; 
    border-bottom: 1px solid #D0E0EA; 
    font-size: 1.4em; 
} 

#details_gdr tbody tr:not(:last-child) th + th::before { 
    color: #D0E0EA; 
    content: '|'; 
    font-size: 0.6em; 
    position: relative; 
    top: -2px; 
    left: -7px; 
} 

#details_gdr tbody tr th { 
    width: 28px; 
    text-align: center !important; 
} 

https://jsfiddle.net/p4ynsxt3/

+0

Великий ответ Спасибо! – alonblack

-2

вы можете использовать изображение на правой стороне, чтобы быть ваш делитель как следующий CSS:

background:url(line.png) bottom right no-repeat; 
Смежные вопросы