【发布时间】:2015-10-30 00:22:25
【问题描述】:
我似乎无法在表格行tr 的一侧添加边框半径和一些填充。
这是我想要达到的效果:
但这才是我真正的所在:
我的 HTML:
<div id="working_hours_pop">
<table>
<tr><td class="day">Понеделник</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr><td class="day">Вторник</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr><td class="day">Среда</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr><td class="day">Четврток</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr id="current"><td class="day">Петок</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr><td class="day">Сабота</td><td class="time">од 8:00ч<span>—</span>до 19:00ч</td></tr>
<tr><td class="day">Недела</td><td id="sun">Затворено</td></tr>
</table>
</div>
我的 CSS:
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table {
position: relative; float: left; clear: none; display: block;
width: auto; height: auto; margin: 0; padding: 0;
border: 0px yellow solid;
}
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop {
position: absolute; float: none; clear: both; top: 0; right: -350px;
width: 310px; height: auto; margin: -80px auto 0; padding: 15px 10px;
font-weight: 700; font-size: 12px;
-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
box-shadow: inset 0 0 0 2.98px rgba(255, 255, 255, 0.0);
background-color: rgba(45, 138, 191, 0.95);
z-index: 20;
}
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table td { padding: 3px 0; }
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table td.day { width: 90px; text-align: left; }
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table td.time { width: 200px; text-align: right; }
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table td.time span { padding: 0 18px; }
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table td#sun { width: 200px; text-align: center; }
html body div#sidebar_panel div#sidebar_cnt div#working_hours div#working_hours_pop table tr#current {
-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;
border: 1px solid;
background-color: rgba(25, 60, 88, 0.95);
}
我做错了吗?这甚至可能吗?
我尝试在tr 中添加div 并对其进行样式设置以实现我所追求的。但它没有用。
【问题讨论】:
标签: html css html-table tablerow