How to remove the gap (relative position)

nicknone

New member
I want to remove the gap from the Tab3 (see picture), I have found out it occurs when I set the height for the picture (420x200) in Tab2. When i remove the height, it looks normal, but i want also showing the picture on Tab2. So could anyone have a proper solution to fix this issue?
ZnYTR.jpg

Here the code:

HTML

Code:
<table class="maindesign" align="center">
<tr>
    <td width="300" ALIGN="Center" valign="top" class="bgsheet">
        <div class="tabhead"><span>Tab1</span></div>


</td>

<td width="400" valign="top" class="bgsheet">
<div class="tabhead"><a><span>Tab2</a></div>
<center>
    <div class="em">
        <a href="#" target="_blank">
        </a>
    </div>

    <br>
    </td>

</CENTER>
<td class="bgsheet">
    <div class="tabhead"><a><span>Tab3</span></a></div>

<td>
</tr>



</table>

</div>

</BODY>
</HTML>

CSS

Code:
.maindesign {
border-spacing:15px;
margin-top:0px;
}

.bgsheet {
background: white;
box-shadow: 0px 0px 6px 1px #909090;
width:450px;
text-decoration:none;
position: relative;
padding: 0px;
margin:0px;
border-top-left-radius:25px;
border-top-right-radius:25px;
border: 0px solid #909090;
}

.tabhead {
text-align:center;
background: #5d9ac3;
background: -moz-linear-gradient(top,  #5d9ac3 0%, #3b6e9f 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5d9ac3), color-stop(100%,#3b6e9f));
background: -webkit-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%);
background: -o-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%);
background: -ms-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%);
background: linear-gradient(to bottom,  #5d9ac3 0%,#3b6e9f 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5d9ac3', endColorstr='#3b6e9f',GradientType=0 );
width: 100%;
height: 30px;
border-top-left-radius:20px;
border-top-right-radius:20px;
border: 0px solid #044062;
border-bottom-width: 0px;
padding-top:12px;
padding-bottom:0px;
box-shadow: 0px 1px 3px #383838;
cursor: default;
}

.Tabkopf2 {
text-align:center;
background: #5d9ac3; /* Old browsers */
background:    -moz-linear-gradient(top,  #5d9ac3 0%, #3b6e9f 100%); /* FF3.6+ */
background:        -webkit-gradient(linear, left top, left bottom, color-stop(0%,#5d9ac3), color-stop(100%,#3b6e9f)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%); /* Chrome10+,Safari5.1+ */
background:      -o-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%); /* Opera 11.10+ */
background:     -ms-linear-gradient(top,  #5d9ac3 0%,#3b6e9f 100%); /* IE10+ */
background:         linear-gradient(to bottom,  #5d9ac3 0%,#3b6e9f 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#5d9ac3', endColorstr='#3b6e9f',GradientType=0 ); /* IE6-9 */
height: 30px;
border-top-left-radius:20px;
border-top-right-radius:20px;
border: 0px solid #044062;
border-bottom-width: 0px;
padding-top:12px;
padding-bottom:0px;
box-shadow: 0px 0px 5px #383838;
cursor: default;
}

.em {
    width:420px;
    height: 200px;
    margin: 20px auto;
    padding: 0;
    overflow: hidden;
    background: url(https://placeholdit.imgix.net/~text?txtsize=39&txt=420%C3%97200&w=420&h=200) no-repeat center;
    background-size: cover;
}
 
Declare vertical-align: top for the table element in question.

CSS

Code:
.bgsheet {
    background: white;
    box-shadow: 0px 0px 6px 1px #909090;
    width: 450px;
    text-decoration: none;
    position: relative;
    padding: 0px;
    margin: 0px;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    border: 0px solid #909090;
    vertical-align: top;
}
 
Back
Top