Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have done this please check and reduce space between two trs
XML
<html>
<head>

<style type="text/css">

<link rel="stylesheet" href="stylesheet-pure-css.css">



</style>
<style type="text/css">
#lkj:hover {
   border-bottom: 3px solid pink;
}
#abc,#xyz
{
  display: inline;
}
table {
  border-collapse: collapse;
}
</style>
</head>
<body>
<table  cellspacing="0"margin:"0" >
<tbody>
<tr height="0">
<div id="abc" style="width:188px; ">
<img id="lkj" src="image.jpg" height="218" width="140">
</div>
</tr>
<tr>
<div id="xyz" style="width:208px;height:20px " align:"center">

<td>
<div class="example">

<div>

      <input id="checkbox2" type="checkbox" name="checkbox" value="2">
<label for="checkbox2"><span></span></label>

</td>
<td>
<p><h6>Rs.2300</h6></p>
</td>
<td>
<a href="http://www.google.co.in"><img src="pint.jpg"alt=""width="15" height="11"></a>
<a href="http://www.google.co.in"><img src="fb.png"alt=""width="15" height="11"></a>
</td>
</tr>
</tbody>
</table>
     </div>
 </div>

</div>

</body>
</html>
Posted
Comments
jaket-cp 23-Sep-15 4:05am    
Having a quick look, please fix your html first, it is not well formed.
For a start div tag is not allowed to be a direct child of tr tag.
The opening and closing of div tags are also misplaced.
In the table tag, when implementing css use the style attribute.
[no name] 23-Sep-15 5:55am    
check the margin property and padding property. It depends upon the block element as well. If you are having a fixed height object in a block element then it will make the parent to occupy the same size. make sure you have no such element in a parent element.

1 solution

This is not a space between two rows but height of second row. In second tr you have kept height of image which increases height of whole row. Or remove h6 and p tag before Rs.2300 which will set height automatically. And as mentioned above please close all html tag properly. div tag can not be nested in tr tag. Please mention div in td tag only.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900