I am currently facing an issue with two tables. The first table consists of 2 rows and 4 columns, with the first column spanning 2 rows. However, in the visual representation, the last 3 columns are misaligned with the rows. How can this alignment be corrected?
Furthermore, the columns in this table have been set to equal sizes.
The second table also has 3 columns but multiple rows. It appears that the first 3 columns are compressed together. Could someone identify the problem? I suspect it may be related to my CSS.
HTML code for the tables:
<table class="equalDevide" cellpadding="0" cellspacing="0" width="100%" border="0">
Here is the HTML for the second column in the first row of the first table:
<td>
<div id="positionAnchor">
<img src="adele.jpg" alt="Adele">
<div id="bottom">
<h4 class="topText">ALBUM</h4>
<h3 class ="topText">ADELE 21 COVER </br> ADELE</h3>
</div></div>
</td>
Second column in the second row:
<tr id="left-col">
<td>
<div id="caption-color">
<h3 id="active">Adele 21 Album</h3>
<p class="music-name"><span class ="glyphicon glyphicon-headphones"> Adele - Skyfall</span></p>
</div>
</td>
Below is the associated CSS:
#bottom{
position: absolute;
display: inline-block;
bottom: 0px;
left:0px;
}
#positionAnchor {
position: relative;
width:1px;
}
#caption-color{
background-color: #212121;
position: relative;
display: inline-block;
bottom: 0px;
padding: 5px;
float: bottom;
}
.equalDevide td {
width:25%;
}
HTML code for the second table:
<table class="table">
<tbody>
<tr>
<td id="left-info">
<span class="glyphicon glyphicon-calendar"> 17 SEPTEMBER</span>
</td>
<td id="left-info">
<span class="glyphicon glyphicon-music" > MARTIN GARRIX</span>
</td>
<td id="left-info">
<span class="glyphicon glyphicon-map-marker"> NEW ORLEANS,LA</span>
</td>
<td id="buyNow">
Buy Now
</td>
</tr>
CSS for the second table:
table{
border-collapse: collapse;
}
tr{
background-color: #575757;
border-top: 10px solid #383D3D !important;
}
td{
border-left: 3px solid #383D3D !important;
text-align: center;
}