Issue
I wanna reduce the line height between table rows. I used the following code, But it didn't work for me. Please look at my picture. I wanna reduce the line height between "Mon-Sat 09:00 AM - 7:00 PM" and
"We closed Sunday & Holidays". see the photo

I used following code, But I didn't do anything
.tb tr {
height: 0px;
}
table {
margin: 0 15.0% 0 0;
float: right;
}
p {
font-weight: bold;
float: right;
}
span {
font-weight: bold;
color: red;
}
<table class="tb">
<tr>
<td>
<p>Business Hours:</p>
</td>
<td><span>Mon - Sat 09:00AM - 7:00PM</span></td>
</tr>
<tr>
<td></td>
<td><span>We closed Sunday & Holidays</span> </td>
</tr>
</table>
Please tell me how to do it.. default table height is very high.
Solution
The p tag has margin at top and bottom from the browser css. Please just add the below condition and adjust the margins to your desired height!
.tb tr {
height: 0px;
}
p.bottom-no-space {
margin: 0px;
}
<table class="tb" style="margin:0 15.0% 0 0; float: right;">
<tr>
<td>
<p style="font-weight: bold; float: right;" class="bottom-no-space">Business Hours:</p>
</td>
<td><span style="font-weight: bold; color: red; ">Mon - Sat 09:00AM - 7:00PM</span></td>
</tr>
<tr>
<td></td>
<td><span style="font-weight: bold;color: red; ">We closed Sunday & Holidays</span> </td>
</tr>
</table>
Answered By - Naren Murali
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.