Filling the top part of this window? - html

I've got a popup window that looks like this
Now I want to top part where the color is green and it says "Sök efter ärende" to strech all the way of the window so that the X that is used to close the window is right at the very right. I tried setting colspan to a larger value but that did not work. Do you have any idea what I could do? This is my HTML for the window
<div class="popup" id="popupF"
style="display: none;" >
<table width="100%" border="0" cellspacing="0" cellpadding="2"
align="center" class="TB_nb">
<tr>
<td colspan="3" class="pusher TB_nb"><h2>Sök efter ärende</h2>
</td>
<td><a href="javascript:void(0)"
onclick="document.getElementById('popupF').style.display = 'none';">X</a>
</td>
</tr>
</table>
<br>
<br>
<h2 class="pusher">Sök efter ärende</h2>
<div id="FVsok">
<div
style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;">
<span
onClick="getElementById('FsokF').style.display='', getElementById('FbottomA').style.display='none', getElementById('FbottomV').style.display='', getElementById('FVsok').style.display='none'"
class="link_sm">Visa sökformulär</span>
</div>
</div>
<div id="FsokF">
<div
style="text-align: right; width: 100%; padding-right: 5%; padding-top: 5px;; padding-bottom: 5px;">
<span
onClick="getElementById('FsokF').style.display='none', getElementById('FbottomA').style.display='none', getElementById('FbottomV').style.display='', getElementById('FVsok').style.display=''"
class="link_sm">Dölj sökformulär</span>
</div>
<div style="width: 100%; margin-left: 15px; margin-right: 80px;"
class="fontS80">
<div class="fl30"> Sök efter ärende</div>
<div class="clear"></div>
<div class="fl30">
<input type="text" size="60"
name="searchArende">
</div>
<div class="clear"></div>
<div class="fl30">
<input type="button" value="Avbryt">
</div>
<div class="fl10">
<input type="button" value=" Sök "
onclick="javascript:doSubmit('Arendesokning', 'search')">
</div>
<div class="clear"> </div>
</div>
</div>
<div style="width: 100%; margin-left: 15px; margin-right: 15px;">
<table width="100%" border="0" cellspacing="0" cellpadding="4"
align="center">
<tr>
<td><h3>Sökresultat:</h3>
</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="4">En massa text <span class="link">Hjälp!</span>
</td>
</tr>
<tr>
<td><input type="button" value="Visa alla">
</td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr class="smallb">
<td>Antal ärenden: 0</td>
<td> </td>
<td>Visa ärenden: <a class="link"
href="javascript:doSubmit('MenyNavigation', 'REW_includes/fullfoljd_fran_sok.jsp')">
</a> <a class="link"
href="javascript:doSubmit('MenyNavigation', 'FWD_includes/fullfoljd_fran_sok.jsp')">
</a></td>
<td> </td>
</tr>
</table>
<table width="100%" cellspacing="0" align="center" class="sortable"
id="unique_id">
<tr>
<th class="thkant">Ärende</th>
<th class="thkant">Ingivningsdag</th>
<th class="thkant">Sökande1</th>
<th class="thkant">Uppfinnare1</th>
<th class="thkant">Ombud1</th>
<!--
<th class="thkant">Region</th>
<th class="thkant">Land</th>
<th class="thkant">Telefonnummer</th>-->
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr class="g2"
onmouseover="javascript:setStoreStyle(this)"
; onmouseout="javascript:getStoreStyle(this)"
onclick="javascript:goToOversikt('','','','','','')"
style="cursor: pointer;">
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
<div id="FbottomV">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button" id="visaknapp"
value="Visa" disabled style="width: 150px;"
onClick="getElementById('sokR').style.display='', getElementById('bottomA').style.display='', getElementById('bottomV').style.display='none', getElementById('Vsok').style.display='', getElementById('sokF').style.display='none'">
</td>
<td align="right"><input type="button" value="Avbryt"
style="width: 150px;" class="checkmargin"><input
type="button" value="Infoga" disabled style="width: 150px;">
</td>
</tr>
</table>
</div>
<div id="FbottomA" style="display: none">
<table width="100%" align="center">
<tr>
<td align="left"><input type="button"
value="Ändra i register" style="width: 150px;">
</td>
<td align="right"><input type="button" value="Avbryt"
style="width: 150px;" class="checkmargin"><input
type="button" value="Infoga" style="width: 150px;">
</td>
</tr>
</table>
</div>
</div>
</div>
And this is the CSS
* {font-family:arial;}
.avnamn{
color: #90002b;
font-size: 140%;
display: inline;
vertical-align: 3%;
margin-left: 1%;
}
.b{border:1px solid #000;}
.readonly{background-color: #CCC;}
.Webdings{
font-family: Webdings;
}
ul{margin-top: 0px}
.mt3{margin-top:-3px;}
.mt5p{margin-top:5px;}
.fontS80 {font-size: 80%;}
a:link{color:#000; text-decoration:none; }
a:visited{color:#000; text-decoration:none; }
a:hover{color:#000; text-decoration:none; }
a:active{color:#000; text-decoration:none; }
.fontS75 {font-size: 75%;}
.link{color: #003366;
text-decoration: underline;
cursor: pointer;
font-weight: bold;}
.link_sm{color: #003366;
text-decoration: underline;
cursor: pointer;}
.link_sm{font-size: 70%;cursor: pointer;}
.small{font-size: 75%;}
.smallg{font-size: 75%;
color: #555;}
.ssmall{
font-size: 65%;
font-weight: bold;
color: #555;
}
.small60{font-size: 60%;}
.small50{
font-size: 50%;
color: #333;
}
.smallb{font-size: 85%;}
table{display:inline;}
h1{font-size: 130%;display:inline;}
h2{font-size: 100%;display:inline;}
h3{
font-size: 80%;
display:inline;
font-family: "Arial Unicode MS", Arial, Helvetica, sans-serif;
}
h4{font-size: 70%;display:inline;}
h5{
font-size: 80%;
display:inline;
font-family: "Arial Unicode MS", Arial, Helvetica, sans-serif;
}
.hthin{
font-size: 125%;
}
.th {text-align: left;}
td, th{font-size: 75%;
vertical-align: text-top;}
.td_link{cursor: pointer;}
.td40{height:40px;}
.td60{height:60px;}
.thkant{
border-top: 1px solid #000;
border-bottom: 1px solid #000;
font-size: 70%;
text-align: left;
}
.labb{F0F0E3; c1c1b3 }
.bb{border-bottom: 1px solid #000;}
.bbV{border-bottom: 1px solid #FFF;}
.TB_nbA {background-color:#CCC;}
.TB_bt, .TB_nb, .TB_db, .TB_bb {background-color:#efefdc;}
.hk {background-color:#d9ddb3;}
.hknot {background-color:#f9faf2;}
/*<!--F8F8F1-->*/
.TB_bt{border-top: 1px solid #FFF;}
.TB_bt5{border-top: 5px solid #FFF;}
.TB_bb{border-bottom: 1px solid #999;}
.TB_bb2{border-bottom: 2px solid #c1c1b3;}
.TB_db{border-bottom: 1px solid #000; border-top: 1px solid #000;}
.TB_tb{border-top: 2px solid #efefdc;}
.TB_bo{border: 2px solid #efefdc;}
.TB_bo_hk{border-top: 1px solid #efefdc;}
.TB_bo2{border: 1px solid #efefdc;}
.TB_bo2B{
border-top: 2px solid #c1c1b3;
border-left: 3px solid #efefdc;
border-right: 3px solid #efefdc;
border-bottom: 2px solid #c1c1b3;
}
.TD_bo{
border-right: 1px solid #c1c1b3;
width: 9%;
font-size: 70%;
text-align: center;
}
.TD_bo2{
border-right: 0;
width: 9%;
font-size: 70%;
text-align: center;
}
.ytb{
border-left:3px solid #efefdc;
border-right:3px solid #efefdc;
}
.datum {
font-size: 70%;
padding-right: 5px;
vertical-align: text-top;}
.sub {background:#EAEAEA;}
.sub_meny, .sub_meny_r, .sub_meny_active, .sub_meny_sm{
font-size: 70%;
padding-left: 20px;
padding-right: 20px;
vertical-align: text-top;}
.sub_meny_sm {
font-size: 60%;
vertical-align: middle;
padding-left: 10px;
padding-right: 10px;
}
.sub_meny_r{
float:right;
font-size: 70%;
padding-left: 8px;
padding-right: 8px;}
.sub_meny_rm{margin-top:4px;}
.sub_meny_active{font-weight: bold;}
.flikkant1 {
background-image: url(../images/fl1k.jpg);
background-position: center;
z-index: -1;}
.inl_namn{
font-weight: bold;
font-size: 70%;
color: Black;
text-decoration: none;}
.th{text-align: left;}
.tr{text-align: right;}
.g1{
background-color: #FFF;
line-height: 20px;
}
.g2{
background-color: #EEE;
line-height: 20px;
}
.g3{
background-color: #DCDCDC;
line-height: 20px;
font-weight: bold;
font-size: 100%;
}
.g4{
background-color: #CCC;
line-height: 20px;
}
.popup{
border-color: #000;
border-style: groove;
border-width: 2px;
padding: 0px;
background-color: #FFF;
font-size: 70%;
}
.popuphandlaggare{
border-color: #000;
border-style: groove;
border-width: 2px;
padding: 0px;
background-color: #FFF;
font-size: 70%;
position: absolute;
top: 900px;
}
.popupN{
background-color: #F0F0E3;
color: #000;
width: 100%;
display: inline;
font-weight: bold;
height: auto;
padding: 2px;
border-bottom: 1px solid #000;
}
.pin{padding: 6px;}
.fl10, .fl20, .fl30, .fl40, .fl50, .fl60, .fl70, .fl80, .fl90, .fl100 {
padding-bottom:4px;color: #000000;
}
.over{
background-color: #EFEFDC;
line-height: 20px;
}
.half{
line-height:50%;
}
.quarter{
line-height:25%;
}
.lh10{
line-height:10%;
}
.checkmargin {margin-right: 25px;}
.checkmarginL {margin-left: 25px;}
.pusher {padding-left: 15px;"}
.pusherR {margin-right: 40px;"}
.rand3{background-color: #FFF; line-height: 3px;}
.rand1{background-color: #FFF; line-height: 1px;}
.whiteborder { color: #ffffff; border: 4px solid #ffffff; padding: 10px; margin: 10px; }
#details { width: 700; color: #ffffff; }
.column1 { color: #000000; margin: 0; padding: 0; width: 600px; border:0; float: left; }
.column2 { color: #000000;margin: 0; padding: 0; border:0; width: 80px; float: right; }
.f200 {
color: #000000;
}
.f210 {
color: #000000;float: left;
}
.f220 {
width: 400;
}
.f1450 {
width: 600;
float:left;
}
.f1550 {
width: 150;
float:left;
padding:15px;
}
.paddedcell {
padding:15px;
}
.b2{border:2px solid #efefdc;}
.inp_sel{width: 80%;}
.fl21{float:left; padding:5px; margin:5px; width:150px;} .fl455{float:left; padding:5px; margin:5px; width:120px;}
.form-bg {
background: #eeefdf;
width:1000px;
overflow:hidden;
}
.form-bg2 {
background: #eeefdf;
width:100%;
overflow:hidden;
}
.data-bar {
border-bottom:1px solid #fbfbf7;
display:inline-block;
padding:10px 10px;
}
.left {
float:left;
width:200px;
}
.discount {
float:right;
width:500px;
}
.discounts {
width:900px;
}
.right {
float:right;
width:700px;
}
.yta20 {
background: #eeefdf;
width:1100px;
}
.yta2 {
width:1100px;
}
.data-box {
width:650px;
height:100px;
border:1px solid #cbcbcb;
}
#table td {
margin:120px;
}
#personName { float:left; width:300px; } #otherDetails { float:right; width:450px; }
.th_rad_sort {border-bottom: 2px solid #000000; text-decoration: none;"}
a img { border: 0; outline:0;}
.horizontal-gradient2 {
background: #1a2adb; /* Old browsers */
background: -moz-linear-gradient(left, #1a2adb 0%, #a1e6ed 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#1a2adb), color-stop(100%,#a1e6ed)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #1a2adb 0%,#a1e6ed 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #1a2adb 0%,#a1e6ed 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, #1a2adb 0%,#a1e6ed 100%); /* IE10+ */
background: linear-gradient(left, #1a2adb 0%,#a1e6ed 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1a2adb', endColorstr='#a1e6ed',GradientType=1 ); /* IE6-9 */
color: white;
width: 1015px;
}
.f { float: right; color: white; }
.handlaggare { width: 1000px; }
div.data-box-nat{
margin-bottom: 10px;
border: 2px solid gray;
width: 600px;
}
div.data-box-pct{
margin-bottom: 10px;
border: 2px solid gray;
width: 600px;
}
.newpopup {
z-index:100;
position: absolute;
top:50%;
left:50%;
background-color:#ffffff; //not working
}

Change the top (troublesome) table to div:
<div id="topBar">
<span class="pusher TB_nb"><h2>Sök efter ärende</h2></span>
<span id="close">
X
</span>
</div>
Then add this css:
#topBar {width:100%; background-color:#EFEFDC;}
#close {position:absolute; right:5px;}
Heres an example: http://jsfiddle.net/FSra3/
On a side note, you really should not be using tables. Tables are for tabular data only, not to be used for layout.

Hey now add some code add your first table as like this
replace this code of your first table
<table width="100%" border="0" cellspacing="0" cellpadding="2"
align="center" class="TB_nb" style="display:table;">
<tr>
<td width="75%" class="pusher TB_nb"><h2>Sök efter ärende</h2>
</td>
<td width="25%" style="text-align:right;"><a href="javascript:void(0)"
onclick="document.getElementById('popupF').style.display = 'none';">X</a>
</td>
</tr>
</table>
Live demo

Just in case you still want to use table. In css file, you make display style of table as inline table{display:inline;} This makes the table shrink to fit its content. Use this instead: table{display:block;}

Related

How can I make a button and textbox elements inside the table cell to get the full height?

I have table and inside this table button and textbox.
Here the code:
#dvStockCard{
border-style: solid;
border-width: thin;
padding: 12px 5px 5px 5px;
}
.title {
font-size: small;
border-top: 2px solid #686868;
color:#383838;
padding: 8px calc(100% - 10ch) 0px 0px;
}
/*----table styles----*/
#dvStockCard table{
font-family: sans-serif;
font-weight: 600;
border-collapse: collapse;
width: 100%;
font-size: x-small;
}
#dvStockCard table tr{
border-bottom: 2px solid lightgray;
color: #707070;
}
#dvStockCard table td {
padding: 8px;
}
#dvStockCard table tr td:nth-child(2) {
text-align: right;
}
/*------values styles------*/
.val{
font-size: small;
color: black;
}
#lastPrice{
font-family: 'Palatino Linotype';
font-size: 160%;
color:black;
}
#change{
font-family: 'Palatino Linotype';
font-size: 160%;
color:green;
}
.halfWidth{
position: relative;;
width:50%;
}
/*-------helpers styles--------*/
.spaceTop-10{
margin-top:10px
}
.spaceBottom-10{
margin-bottom:10px
}
.fullWidth{
width:100%;
}
.fullHeight{
height:100%;
}
<div id="dvStockCard">
<div class="title spaceBottom-10">My data cart</div>
<table>
<tr>
<td id="lastPrice">no price</td>
<td id="change">1234324t</td>
</tr>
<tr>
<td>Range</td>
<td id="range" class="val">No Rnge</td>
</tr>
<tr>
<td>Open</td>
<td id="open" class="val">555</td>
</tr>
<tr>
<td>Volume</td>
<td id="volume" class="val">DM</td>
</tr>
<tr>
<td>Market Cap</td>
<td id="marketCap" class="val">Non</td>
</tr>
<tr>
<td></td>
<td id="timestamp">As of 12:00 AM</td>
</tr>
<tr>
<td style="width:50%;"><input type="text" class="fullWidth fullHeight"></td>
<td style="width:50%"><input type="button" value="Get" class="fullWidth fullHeight"></td>
</tr>
</table>
</div>
My question is how can I make a button and textbox inside the table cell in the table above to get the full height of the row(I tried height:100%)?
Couple of things:
You have already defined 8px of padding under #dvStockCard table td{...} that's why you had default padding for all. Considering you need that padding I have overridden the td padding for last row.
Use border-collapse: collapse; for the row and padding & margin to 0 for td. Now you can use your desired height for that row.
#dvStockCard {
border-style: solid;
border-width: thin;
padding: 12px 5px 5px 5px;
}
.title {
font-size: small;
border-top: 2px solid #686868;
color: #383838;
padding: 8px calc(100% - 10ch) 0px 0px;
}
/*----table styles----*/
#dvStockCard table {
font-family: sans-serif;
font-weight: 600;
border-collapse: collapse;
width: 100%;
font-size: x-small;
}
#dvStockCard table tr {
border-bottom: 2px solid lightgray;
color: #707070;
}
#dvStockCard table td {
padding: 8px;
}
#dvStockCard table tr td:nth-child(2) {
text-align: right;
}
/*------values styles------*/
.val {
font-size: small;
color: black;
}
#lastPrice {
font-family: 'Palatino Linotype';
font-size: 160%;
color: black;
}
#change {
font-family: 'Palatino Linotype';
font-size: 160%;
color: green;
}
.halfWidth {
position: relative;
;
width: 50%;
}
/*-------helpers styles--------*/
.spaceTop-10 {
margin-top: 10px
}
.spaceBottom-10 {
margin-bottom: 10px
}
.trClass {
border-collapse: collapse;
}
.trClass td {
height: 40px;
padding: 0 !important;
/* need this because you already used 8px to the td*/
margin: 0 !important;
/* need this because you already used 8px to the td*/
}
.fullWidth {
width: 100%;
}
.fullHeight {
height: 100%;
}
<div id="dvStockCard">
<div class="title spaceBottom-10">My data cart</div>
<table>
<tr>
<td id="lastPrice">no price</td>
<td id="change">1234324t</td>
</tr>
<tr>
<td>Range</td>
<td id="range" class="val">No Rnge</td>
</tr>
<tr>
<td>Open</td>
<td id="open" class="val">555</td>
</tr>
<tr>
<td>Volume</td>
<td id="volume" class="val">DM</td>
</tr>
<tr>
<td>Market Cap</td>
<td id="marketCap" class="val">Non</td>
</tr>
<tr>
<td></td>
<td id="timestamp">As of 12:00 AM</td>
</tr>
<tr class="trClass">
<td style="width:50%;"><input type="text" class="fullWidth fullHeight"></td>
<td style="width:50%"><input type="button" value="Get" class="fullWidth fullHeight"></td>
</tr>
</table>
</div>
You could try wrapping it up in a container and later set it to 100% height. If not, you could try setting the height in px, you go trying different measurements until you see which one fills your desire. I hope I could help you

Can not place 2 tables side-to-side

I'm fairly new to HTML so please bear with me. I'm trying to create a printable invoice in html. I'm having an issue with placing the top 2 tables side by side. Despite using inline-block, the tables are not being stacked next to each other
What am I doing wrong? Any help or suggestion would be greatly appreciated!
body {
padding: 1%;
padding-top: 3%;
font-family: Arial, Arial Black;
font-size: small;
}
.RetailerLogo {
position: absolute;
top: 0px;
width: 250px;
}
.RetailerLogo img {
width: 100%;
}
.RetailerOrderData {
position: absolute;
top: 20px;
right: 20px;
font-size: small;
}
.PageTitle {
font-family: Arial Black, Arial;
font-size: x-large;
border-bottom: 5px;
}
table thead {
font-family: Arial Black, Arial;
background: Pink;
color: Red;
height: 15px;
}
table thead td {
border-bottom: solid thin black;
}
table.Info {
width: 50%;
margin-bottom: 20px;
margin-right: 2%;
border-style: solid;
border-width: thin;
border-color: Red;
}
table.Info tbody td {
font-family: Arial;
height: 60px;
padding-top: -3px;
}
table.Contents {
width: 99%;
display: block;
text-align: center;
border-style: solid;
border-width: thin;
border-color: Black;
font-family: Arial;
font-size: small;
}
table.Contents tbody {
border-style: solid;
border-width: thin;
border-color: Black;
}
table.Contents tbody td {
padding-top: 0px;
margin-bottom: -5px;
}
table.Contents tbody tr {
padding-top: 0px;
margin-bottom: -5px;
}
<div class="RetailerLogo">
<img class="RetailerLogo" src="filepath" alt="Retailer Logo" />
</div>
<BR>
<BR>
<BR>
<BR>
<center>
<div class="PageTitle">Package Summary</div>
</center>
<BR>
<BR>
<BR>
<BR>
<BR>
<div class="RetailerOrderData">
<span style="FONT-SIZE: 10pt; FONT-FAMILY: AdvC39c; FONT-SIZE: 12pt; font-stretch:expanded;">
*%RETAILERORDERNUMBER%*
</span><br /> Order #: %RETAILERORDERNUMBER%<br /> Order Date: %RETAILERORDERDATE%<br /> Ship Method: %SHIPPINGMETHOD%<br/>
</div>
<table border="0" class="Info ShippingReturn">
<thead>
<tr>
<td>
Contact Info: Company Name
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGRETURNADDRESS%<br/> Email: orders#gifpop.io
</td>
</tr>
</table>
<table class="Info ShipTo">
<thead>
<tr>
<td>
Shipped to: %CUSTOMERNAME%
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGADDRESS%
</td>
</tr>
</table>
<table class="Contents">
<thead>
<tr>
<td width="125"><b>Image</b></td>
<td width="75"><b>Qty</b></td>
<td width="150"><b>Code</b></td>
<td width="320"><b>Description</b></td>
</tr>
</thead>
%SHIPMENTDETAILWITHIMAGE%
<tr>
<td width="125"> </td>
<td width="75"> </td>
<td width="150"> </td>
<td width="320"> </td>
</tr>
</table>
<b>
<b>
<b>
check out this hope this would work..capsule tables inside div and adjust using float property hope it would solve ur issue..
.floatLeft { width: 50%; float: left; }
.floatRight {width: 50%; float: right; }
.container { overflow: hidden; }
body {
padding: 1%;
padding-top: 3%;
font-family: Arial, Arial Black;
font-size: small;
}
.RetailerLogo {
position: absolute;
top: 0px;
width: 250px;
}
.RetailerLogo img {
width: 100%;
}
.RetailerOrderData {
position: absolute;
top: 20px;
right: 20px;
font-size: small;
}
.PageTitle {
font-family: Arial Black, Arial;
font-size: x-large;
border-bottom: 5px;
}
table thead {
font-family: Arial Black, Arial;
background: Pink;
color: Red;
height: 15px;
}
table thead td {
border-bottom: solid thin black;
}
table.Info {
width: 50%;
margin-bottom: 20px;
margin-right: 2%;
border-style: solid;
border-width: thin;
border-color: Red;
}
table.Info tbody td {
font-family: Arial;
height: 60px;
padding-top: -3px;
}
table.Contents {
width: 99%;
display: block;
text-align: center;
border-style: solid;
border-width: thin;
border-color: Black;
font-family: Arial;
font-size: small;
}
table.Contents tbody {
border-style: solid;
border-width: thin;
border-color: Black;
}
table.Contents tbody td {
padding-top: 0px;
margin-bottom: -5px;
}
table.Contents tbody tr {
padding-top: 0px;
margin-bottom: -5px;
}
<div class="RetailerLogo">
<img class="RetailerLogo" src="filepath" alt="Retailer Logo" />
</div>
<BR>
<BR>
<BR>
<BR>
<center>
<div class="PageTitle">Package Summary</div>
</center>
<BR>
<BR>
<BR>
<BR>
<BR>
<div class="RetailerOrderData">
<span style="FONT-SIZE: 10pt; FONT-FAMILY: AdvC39c; FONT-SIZE: 12pt; font-stretch:expanded;">
*%RETAILERORDERNUMBER%*
</span><br /> Order #: %RETAILERORDERNUMBER%<br /> Order Date: %RETAILERORDERDATE%<br /> Ship Method: %SHIPPINGMETHOD%<br/>
</div>
<div class="container">
<div class="floatLeft">
<table border="0" class="Info ShippingReturn">
<thead>
<tr>
<td>
Contact Info: Company Name
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGRETURNADDRESS%<br/> Email: orders#gifpop.io
</td>
</tr>
</table>
</div>
<div class="floatRight">
<table class="Info ShipTo">
<thead>
<tr>
<td>
Shipped to: %CUSTOMERNAME%
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGADDRESS%
</td>
</tr>
</table></div>
</div>
<table class="Contents">
<thead>
<tr>
<td width="125"><b>Image</b></td>
<td width="75"><b>Qty</b></td>
<td width="150"><b>Code</b></td>
<td width="320"><b>Description</b></td>
</tr>
</thead>
%SHIPMENTDETAILWITHIMAGE%
<tr>
<td width="125"> </td>
<td width="75"> </td>
<td width="150"> </td>
<td width="320"> </td>
</tr>
</table>
<b>
<b>
<b>
i used ur code and mould it little like wrapping tables inside div and add css accordingly
The easiest : You can turn those 2 tables into table-cell, so they'll stick together side by side (demo below),
else: you'll need to float them or a wrapper to hold them and some extra CSS to keep them side by side no matter what the width avalaible. (possibly inline-block along white-space )
.Info {
display:table-cell;
}
body {
padding: 1%;
padding-top: 3%;
font-family: Arial, Arial Black;
font-size: small;
}
.RetailerLogo {
position: absolute;
top: 0px;
width: 250px;
}
.RetailerLogo img {
width: 100%;
}
.RetailerOrderData {
position: absolute;
top: 20px;
right: 20px;
font-size: small;
}
.PageTitle {
font-family: Arial Black, Arial;
font-size: x-large;
border-bottom: 5px;
}
table thead {
font-family: Arial Black, Arial;
background: Pink;
color: Red;
height: 15px;
}
table thead td {
border-bottom: solid thin black;
}
table.Info {
width: 50%;
margin-bottom: 20px;
margin-right: 2%;
border-style: solid;
border-width: thin;
border-color: Red;
}
table.Info tbody td {
font-family: Arial;
height: 60px;
padding-top: -3px;
}
table.Contents {
width: 99%;
/*display: block;*/
text-align: center;
border-style: solid;
border-width: thin;
border-color: Black;
font-family: Arial;
font-size: small;
}
table.Contents tbody {
border-style: solid;
border-width: thin;
border-color: Black;
}
table.Contents tbody td {
padding-top: 0px;
margin-bottom: -5px;
}
table.Contents tbody tr {
padding-top: 0px;
margin-bottom: -5px;
}
<div class="RetailerLogo">
<img class="RetailerLogo" src="filepath" alt="Retailer Logo" />
</div>
<BR>
<BR>
<BR>
<BR>
<center>
<div class="PageTitle">Package Summary</div>
</center>
<BR>
<BR>
<BR>
<BR>
<BR>
<div class="RetailerOrderData">
<span style="FONT-SIZE: 10pt; FONT-FAMILY: AdvC39c; FONT-SIZE: 12pt; font-stretch:expanded;">
*%RETAILERORDERNUMBER%*
</span><br /> Order #: %RETAILERORDERNUMBER%<br /> Order Date: %RETAILERORDERDATE%<br /> Ship Method: %SHIPPINGMETHOD%<br/>
</div>
<table border="0" class="Info ShippingReturn">
<thead>
<tr>
<td>
Contact Info: Company Name
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGRETURNADDRESS%<br/> Email: orders#gifpop.io
</td>
</tr>
</table>
<table class="Info ShipTo">
<thead>
<tr>
<td>
Shipped to: %CUSTOMERNAME%
</td>
</tr>
</thead>
<tr>
<td>
%SHIPPINGADDRESS%
</td>
</tr>
</table>
<table class="Contents">
<thead>
<tr>
<td width="125"><b>Image</b></td>
<td width="75"><b>Qty</b></td>
<td width="150"><b>Code</b></td>
<td width="320"><b>Description</b></td>
</tr>
</thead>
%SHIPMENTDETAILWITHIMAGE%
<tr>
<td width="125"> </td>
<td width="75"> </td>
<td width="150"> </td>
<td width="320"> </td>
</tr>
</table>
<b>
<b>
<b>
Try implementing the declaration display: grid to build your tables side-by-side. The grid value offers fully responsive 'boxes' that can be stacked as you wish.
This is a simple layout~
HTML
<section class="tableGrid">
<div>
<div>
<p>Row 1 - Table 1</p>
</div>
<div>
<p>Row 2 - Table 1</p>
</div>
</div>
<!-- ********************** -->
<div>
<div>
<p>Row 1 - Table 2</p>
</div>
<div>
<p>Row 2 - Table 2</p>
</div>
</div>
</section>
and CSS
.tableGrid {
margin: 4vh 8vw;
padding: 16px;
display: grid;
grid-template-rows: auto;
grid-gap: 16px;
}
.table {
border: 4px dotted red;
}
#media (min-width: 800px) {
.tableGrid {
margin: 8vh 16vw;
padding: 32px;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(auto-fit: minmax(88px 1fr);
grid-gap: 24px;
}
}
Check out this pen and if you like what you see learn more about using grid here.

Show tooltip(in span) always top in table

Hello I have a table and I made a tooltip with CSS
its shows up when u hover mouse on <td>
here's my jsfiddle : www.jsfiddle.net/4qzurb5w/
How can I make this tooltip always shows up everything in table?
Get rid of this block, it is conflicting:
.green:hover,
.blue:hover,
.red:hover,
.yellow:hover,
.black:hover {
opacity: 0.8;
}
It should work then.
I moved your opacity style to .tooltip .tooltiptext, see stack snippet.
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
opacity: 0.8; /* <-- I added your opacity here */
/* Position the tooltip */
position: absolute;
z-index: 1;
top: 100%;
left: 50%;
margin-left: -60px;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
.div table {
font-family: Arial, Helvetica, sans-serif;
color: #666;
font-size: 10px;
text-shadow: 1px 1px 0px #fff;
background: #eaebec;
border: #ccc 1px solid;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-moz-box-shadow: 0 1px 2px #d1d1d1;
-webkit-box-shadow: 0 1px 2px #d1d1d1;
box-shadow: 0 1px 2px #d1d1d1;
}
.div table caption {
font-weight: bold;
font-size: 11px;
}
.div td {
min-width: 100px;
text-align: center;
padding: 5px;
border-top: 1px solid #ffffff;
border-bottom: 1px solid #e0e0e0;
border-left: 1px solid #e0e0e0;
background: #fafafa;
background: -webkit-gradient(linear, left top, left bottom, from(#fbfbfb), to(#fafafa));
background: -moz-linear-gradient(top, #fbfbfb, #fafafa);
}
.red {
background: #940000 !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.blue {
background: #1C2CFA !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.black {
background: #000000 !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.yellow {
background: #009999 !important;
color: Green !important;
text-shadow: 1px 1px 0px #000000;
}
.white {
background: #fafafa !important;
color: #666 !important;
}
.grey {
background: #808080 !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.ariza {
background: #990000 !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.green {
background: #00941C !important;
color: White !important;
text-shadow: 1px 1px 0px #000000;
}
.green:hover,
.blue:hover,
.red:hover,
.yellow:hover,
.black:hover {
/* opacity: 0.8; get rid of this */
}
.green a,
.blue a,
.red a,
.yellow a,
.black a {
display: block;
color: White;
text-decoration: none;
}
.yazitd {
width: 70px !important;
}
.sagtd {
width: 540px !important;
}
.tarihtd {
width: 160px !important;
}
.style3 {
width: 90px;
}
.style4 {
height: 19px;
}
.style5 {
width: 40px;
}
.style6 {
width: 40px;
height: 23px;
}
.style7 {
height: 23px;
}
<table>
<tbody>
<tr>
<td style="vertical-align: middle; min-width: 50px !important; font-weight: bold;">KAT 1 </td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="red tooltip">Daire No:1
<div><span class="tooltiptext">ALEX DE SOUZA<br>HASAN ALİ KALDIRIM<br>ALPER POTUK<br>RIDVAN DİLMEN<br></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:2
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="red tooltip">Daire No:3
<div><span class="tooltiptext">ALİ KOÇ<br></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:4
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align: middle; min-width: 50px !important; font-weight: bold;">KAT 2 </td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip" style="font-weight: 400;">Daire No:5
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:6
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:7
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:8
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="vertical-align: middle; min-width: 50px !important; font-weight: bold;">KAT 3 </td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:9
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:10
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
<td>
<table>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:11
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</table>
</td>
<td>
<table>
<tbody>
<tr>
<td style="vertical-align: top;">
</td>
</tr>
<tr>
<td class="green tooltip">Daire No:12
<div><span class="tooltiptext"></span></div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

Separator of different sizes

Is it possible to have separator of diferent sizes as the example below
PlunkerDemo
<tr class="foo">
<td>
<div>
<p>
<span class="departureTime">03h00</span>
<span>New-York</span>
</p>
<p class="espacement_important">
<span class="arrivalTime">15h00</span>
<span>Bahamas</span>
</p>
<p class="duration espacement_important"><span >8h00</span>
<span>2 correspond.</span>
<span>A380</span>
</p>
</div>
</td>
<td class="unavailable">indisponible</td>
<td><input type="radio" />
<label >10.00 €</label>
</td>
<td><input type="radio" />
<label >50.00 €</label>
</td>
</tr>
You can do this usign pseudo-elemnts:
First assign name classes to your td elements like long and short:
<td class="long">
<div>
<p>
<span class="departureTime">03h00</span>
<span>New-York</span>
</p>
<p class="espacement_important">
<span class="arrivalTime">15h00</span>
<span>Bahamas</span>
</p>
<p class="duration espacement_important"><span>8h00</span>
<span>2 correspond.</span>
<span>A380</span>
</p>
</div>
</td>
<td class="unavailable">indisponible</td>
<td class="short">
<input type="radio" />
<label>10.00 €</label>
</td>
Then use CSS like this:
.long {
position:relative;
}
.long:after {
content:" ";
height:80%;
border-right:1px solid #eee;
position:Absolute;
right:0;
top:10%;
}
.short {
position:relative;
}
.short:after, .short:before {
content:" ";
height:40%;
border-right:1px solid #eee;
position:Absolute;
right:0;
top:30%;
}
.short:before {
left:0;
right:auto;
}
PlunkerDemo
If you want to avoid the classnames you can use nth-child but only if suits your needs
See the method below and adjust as needed. Will work with a DIV also
table {
border: none;
border-collapse: #EEEEEE;
}
tr {
border: solid 1px #5E6977;
display: block;
margin-bottom: 10px;
min-height: 60px;
width: 500px;
padding: 5px;
}
tr.no-border {
border: none;
border-bottom: solid 1px #5E6977;
}
th {
line-height: 60px;
border: none;
width: 160px;
}
td {
border: none;
width: 160px;
height: 60px;
position: relative;
}
td:last-of-type {
border-right: none;
}
td:nth-of-type(1):after {
content:'';
border-right: solid 1px #5E6977;
position: relative;
width: 160px;
min-height: 30px;
display: table;
background: transparent;
top: 1%;
line-height: 60px;
}
td:nth-of-type(2):after {
content:'';
border-right: solid 1px #5E6977;
line-height: 60px;
position: absolute;
width: 160px;
min-height: 50px;
display: table;
background: transparent;
top: 10%;
}
<table width="200" border="1">
<tbody>
<tr class="no-border">
<th>Month</th>
<th>Savings</th>
<th>Savings</th>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</tbody>
</table>
support cross browser. simplicity new row.
...
<td>
<div style="width:1px;height:91px;background:green;"></div>
</td>
<td class="unavailable">indisponible</td>
<td>
<div style="width:1px;height:91px;background:green;"></div>
</td>
<td>
<input type="radio" />
<label >10.00 €</label>
</td>
...

IE 9 table spacing issue

The issue is that for some reason when in IE 9 (non-compatibility mode) one of the tds cause a goofy alignment. In this fiddle http://jsfiddle.net/2x3k3y5e/1/ the leftside button is fine it is the first of the right side buttons. For some reason it will not set on the right side. This is a part of user control (button bar) that will create various buttons for a page. ONLY in IE 9 have we noticed this issue. I would like to fix it everywhere and was hoping to use some css for this.
<table style="margin-top:10px;" cellspacing="0" cellPadding="0">
<tbody>
<tr>
<td noWrap="nowrap"> </td>
<td style="width: 100%;">
<input style="width: 125px;" id="BottomButtonBar_btnDelete" class="btnEntry" name="m$c$PatientSearchUC$PanelSearch$PanelSearch_BBB$BottomButtonBar_btnDelete" value="Previous Criteria" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="font-weight: normal; " id="BottomButtonBar_btnUpdate" class="btnEntry" value="Clear" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="width: 65px; font-weight: bold;" id="BottomButtonBar_btnUpdateAndReturn" class="btnPrimary btnEntry" value="Search" type="submit"/>
</td>
</tr>
</tbody>
</table>
CSS:
.btnEntry, .btnNav, .btnPrimary, .btnDefault{
text-transform: none;
cursor: pointer;
padding-right: 0;
padding: 6px 12px;
margin-left:0;
margin-right:0;
color: #000000;
min-width:60px;
}
.btnNav {
background-color: #fff;
border: #ccc 1px solid;
}
.btnEntry {
background-color: #ccc;
/*border: #b2b2b2 1px solid;*/
border: #ababab 1px solid;
color: #404040;
min-width:60px;
}
.btnDefault {
background-color: #ccc;
border: #ababab 1px solid;
color: #404040;
}
.btnPrimary {
color: #ffffff;
background-color: #82a83d;
}
If I set the size it is fine, but I don't think that using jquery to reset the size of a button to it's same size is a good solution. Again I am hoping there is some css trick that I don't know about to fix this. Thanks.
Side Note: I use IETester or a VM with Windows and IE 9
Try Float:right:
HTML:
<table style="margin-top:10px;" cellspacing="0" cellPadding="0">
<tbody>
<tr>
<td noWrap="nowrap"> </td>
<td style="width: 100%;">
<input style="width: 125px;" id="BottomButtonBar_btnDelete" class="btnEntry" name="m$c$PatientSearchUC$PanelSearch$PanelSearch_BBB$BottomButtonBar_btnDelete" value="Previous Criteria" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="font-weight: normal; " id="BottomButtonBar_btnUpdate" class="btnEntry btnClear" value="Clear" type="button"/>
</td>
<td style="padding-left: 4px;">
<input style="width: 65px; font-weight: bold;" id="BottomButtonBar_btnUpdateAndReturn" class="btnPrimary btnEntry" value="Search" type="submit"/>
</td>
</tr>
</tbody>
</table>
CSS:
.btnEntry, .btnNav, .btnPrimary, .btnDefault{
text-transform: none;
cursor: pointer;
padding-right: 0;
padding: 6px 12px;
margin-left:0;
margin-right:0;
color: #000000;
min-width:60px;
}
.btnClear{
float:right;
}
.btnNav {
background-color: #fff;
border: #ccc 1px solid;
}
.btnEntry {
background-color: #ccc;
/*border: #b2b2b2 1px solid;*/
border: #ababab 1px solid;
color: #404040;
min-width:60px;
}
.btnDefault {
background-color: #ccc;
border: #ababab 1px solid;
color: #404040;
}
.btnPrimary {
color: #ffffff;
background-color: #82a83d;
}