Auto expand rotated columns CSS - css

I'm trying to automatically expand the rotated columns automatically when there is more text.
I have tried a variety of css such as removing the tranform-origin or using translateX(-50%) translateY(-50%) rotate(-90deg); options.
I wondered if I am missing anything?
Sample of code below is what I'm working on.
.tcentre {
text-align: center;
}
/*Events Matrix*/
.matrix table,
.matrix td,
.matrix th {
border-spacing: 0;
border: 1px solid;
text-align: left
}
.matrix .vert>th:nth-child(1n+3) {
position: relative;
height: 150px;
min-width: 40px;
padding: 4px;
}
.matrix .vert>th {
overflow: hidden;
}
.matrix .vert>th>div>div {
height: 100%;
line-height: 18px;
width: 150px;
position: absolute;
bottom: -145px;
/*border: 1px solid blue; */
transform: rotate(-90deg);
transform-origin: top left;
}
.matrix .tbottom {
vertical-align: bottom !important;
text-align: left !important;
}
<DIV id="content" class="matrix">
<table>
<thead>
<tr class="vert">
<th class="tbottom" style="Width: 100px;">Part</th>
<th class="tbottom" style="Width: 100px;">Name</th>
<th style="Width: 20px;">
<div>
<div>Park<br>2018-08-12</div>
</div>
</th>
<th style="Width: 20px;">
<div>
<div>War Memorial Lots more text in this cell<br>2018-08-19</div>
</div>
</th>
<th style="Width: 20px;">
<div>
<div>Charity Collection<br>2018-10-13</div>
</div>
</th>
<th style="Width: 20px;">
<div>
<div>Concert<br>2018-10-28</div>
</div>
</th>
<th style="Width: 20px;">
<div>
<div>Remembrance<br>2018-11-10</div>
</div>
</th>
</tr>
<tr>
<td class="nowrap">Score</td>
<td class="nowrap">Person 1</td>
<td class="tcentre colour-Y">Y</td>
<td class="tcentre colour-Y">Y</td>
<td class="tcentre colour-Y">Y</td>
<td class="tcentre colour-Y">Y</td>
<td class="tcentre colour-Y">Y</td>
</tr>
<tr>
<td class="nowrap">Solo Cornet</td>
<td class="nowrap">Person 2</td>
<td class="tcentre colour-Y">Y</td>
<td class="tcentre colour-" />
<td class="tcentre colour-" />
<td class="tcentre colour-" />
<td class="tcentre colour-" />
</tr>
</thead>
</table>
</Div>

Related

How to center an arrow in a table cell?

I would like to center the arrow on each cell, but I can't do it.
.positive-arrow:before {
content: "";
border-style: solid;
border-width: 5px 5px;
border-color: transparent transparent #0dff00 transparent;
}
I tried with position: absolute; left: 65%;, but it's diy....
.positive-arrow:before {
content: "";
border-style: solid;
border-width: 5px 5px;
border-color: transparent transparent #0dff00 transparent;
position: absolute;
left: 65%;
}
Do you know a better solution in CSS, please?
Thank you
.w5 {
width: 5%;
}
.w30 {
width: 30%;
}
.positive-arrow:before {
content: "";
border-style: solid;
border-width: 5px 5px;
border-color: transparent transparent #0dff00 transparent;
}
.negative-arrow:before {
content: "";
border-style: solid;
border-width: 5px 5px;
border-color: #f00 transparent transparent transparent;
}
<!DOCTYPE html>
<html>
<head>
<title>HTML CSS JS</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<body>
<div class="card">
<div class="card-body">
<table class="table table-bordered">
<thead>
<tr>
<th scope="col" class="w30">Indice</th>
<th scope="col" class="w30">Place</th>
<th scope="col" class="w5 text-center">Cours</th>
<th colspan="2" class="w5 text-center">Variation</th>
<th scope="col" class="w30 text-center">Date et heure</th>
</tr>
</thead>
<tbody>
<tr>
<td>DAX Composite</td>
<td >EuroNext</td>
<td class="text-end">1 265,45</td>
<td class="text-end"> <span class="positive-arrow"></span></td>
<td class="text-end">1,50 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
<tr>
<td>DAX</td>
<td>EuroNext</td>
<td class="text-end">14 379,93</td>
<td class="text-end"> <span class="negative-arrow"></span></td>
<td class="text-end">3,40 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
<tr>
<td>Mid Cap DAX</td>
<td>EuroNext</td>
<td class="text-end">5 379,93</td>
<td class="text-end"> <span class="positive-arrow"></span></td>
<td class="text-end">1,40 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>
You need to make your pseudo elements inline block and then if you want to horizontally center them, change the class on the td to text-center (instead of text-end). If you want to vertically center them, then you need to add vertical align middle to the td
.w5 {
width: 5%;
}
.w30 {
width: 30%;
}
.positive-arrow:before {
content: "";
display: inline-block;
border-style: solid;
border-width: 5px 5px;
border-color: transparent transparent #0dff00 transparent;
}
.negative-arrow:before {
content: "";
display: inline-block;
border-style: solid;
border-width: 5px 5px;
border-color: #f00 transparent transparent transparent;
}
.vertical-center {
vertical-align: middle;
}
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<table class="table table-bordered">
<thead>
<tr>
<th scope="col" class="w30">Indice</th>
<th scope="col" class="w30">Place</th>
<th scope="col" class="w5 text-center">Cours</th>
<th colspan="2" class="w5 text-center">Variation</th>
<th scope="col" class="w30 text-center">Date et heure</th>
</tr>
</thead>
<tbody>
<tr>
<td>DAX Composite</td>
<td>EuroNext</td>
<td class="text-end">1 265,45</td>
<td class="text-center vertical-center"> <span class="positive-arrow"></span></td>
<td class="text-end">1,50 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
<tr>
<td>DAX</td>
<td>EuroNext</td>
<td class="text-end">14 379,93</td>
<td class="text-center vertical-center"> <span class="negative-arrow"></span></td>
<td class="text-end">3,40 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
<tr>
<td>Mid Cap DAX</td>
<td>EuroNext</td>
<td class="text-end">5 379,93</td>
<td class="text-center vertical-center"> <span class="positive-arrow"></span></td>
<td class="text-end">1,40 %</td>
<td class="text-center">21/11/2022 - 17:55</td>
</tr>
</tbody>
</table>

create a circle with flexbox and css

I am trying to create a circle css and add some more changes to it,
Here is my code for circles
.container {
display: flex;
flex-wrap: nowrap;
width: 200px;
height: 50px;
}
.holder {
margin-right: 5px;
width: 30px;
height: 30px;
border-radius: 50%;
}
.h1 {
background: blue;
}
.h2 {
background: red;
}
.h3 {
background: green;
}
.h4 {
background: grey;
}
and the html code
<div class="container">
<div class="holder h1"></div>
<div class="holder h2"></div>
<div class="holder h3"></div>
<div class="holder h4"></div>
</div>
works well for the circles, but my end goal is to do this
https://prnt.sc/KCA2zWq435oK
how can i do this, any help will be much appreciated
regards
I created this table
.container {
display: flex;
flex-wrap: nowrap;
width: 200px;
height: 50px;
}
.holder {
margin-right: 5px;
width: 30px;
height: 30px;
border-radius: 50%;
}
.h1 {
background: blue;
}
.h2 {
background: red;
}
.h3 {
background: green;
}
.h4 {
background: grey;
}
th {
writing-mode: vertical-rl;
min-width: 30px;
transform: rotate(180deg);
text-transform: capitalize;
}
td {
min-width: 30px;
height: 30px;
}
<table>
<tr>
<th>
drafted
</th>
<th>
submitted
</th>
<th>
approved
</th>
<th>
processed
</th>
</tr>
<tr>
<td>
<div class="holder h1">
<div/>
</td>
<td>
<div class="holder h2">
<div/>
</td>
<td>
<div class="holder h3">
<div/>
</td>
<td>
<div class="holder h4">
<div/>
</td>
<td>
<div class="holder h3">
<div/>
</td>
<td>
Not drafted - missing
</td>
</tr>
</table>
I hope it helps you
You can easily customize it for yourself
Semantically this is a table.
This snippet creates the circles as radial-gradient backgrounds to the relevant cells.
The headings are written vertically and rotated to give the desired orientation.
thead>tr>th {
writing-mode: vertical-lr;
transform: rotate(180deg);
text-align: left;
}
tbody>tr>td {
width: 50px;
height: 50px;
--bg: gray;
background-image: radial-gradient(circle, var(--bg) 0 70%, transparent 70% 100%);
background-size: 70% 70%;
background-repeat: no-repeat;
background-position: center center;
}
tbody>tr>td:last-child {
width: 400px;
--bg: transparent;
}
.gold {
--bg: gold;
}
.green {
--bg: green;
}
.red {
--bg: red;
}
<table>
<thead>
<tr>
<th>Drafted</th>
<th>Submitted</th>
<th>Approved</th>
<th>Processed</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Not drafted - missing</td>
</tr>
<tr>
<td class="gold"></td>
<td></td>
<td></td>
<td></td>
<td>Drafted but not submitted</td>
</tr>
<tr>
<td class="green"></td>
<td class="green"></td>
<td></td>
<td></td>
<td>Submitted - not approved</td>
</tr>
<tr>
<td class="green"></td>
<td class="green"></td>
<td class="green"></td>
<td></td>
<td>Approved not processed</td>
</tr>
<tr>
<td class="green"></td>
<td class="green"></td>
<td class="green"></td>
<td class="green"></td>
<td>Processed</td>
</tr>
<tr>
<td class="gold"></td>
<td></td>
<td class="red"></td>
<td></td>
<td>Rejected, back in draft</td>
</tr>
<tr>
<td class="green"></td>
<td class="green"></td>
<td></td>
<td></td>
<td>Rejected initially, submitted again</td>
</tr>
</tbody>
</table>

Table Elements not aligning well in Internet Explorer

List element is not aligning center in Internet explorer. But in Chrome the element is centered. Attached is the sample code. I am using Bootstrap CSS Framework for all the classes.
Here is the JSfiddle
https://jsfiddle.net/8cunpsvy/
HTML:
<div class="card-body">
<table class="table-sm table-hover">
<thead>
<tr class="text-center">
<th class="w-25" scope="col"></th>
<th style="width: 54%" scope="col"></th>
<th style="width: 10%" scope="col">Actual</th>
<th style="width: 1%;" scope="col">Status</th>
<th style="width: 10%" scope="col">Expected</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td class="text-center">2/13/2019</td>
<td class="text-center">
<ul class="status-circle"><li></li></ul>
</td>
<td class="text-center"></td>
</tr>
</tbody>
</table>
</div>
CSS:
.status-circle {
list-style: none;
margin: 0;
padding-inline-start: 0;
margin-block-start: 0;
margin-block-end: 0;
border-spacing: 0px;
line-height: 0;
}
.status-circle li {
display: inline-block;
border-radius: 50%;
border: 1px solid #000;
width: 15px;
height: 15px;
background: #737373;
}
I have change the element inside into div and transferred all the styles from the li element also adding content.
HTML:
<div class="card-body">
<table class="table-sm table-hover">
<thead>
<tr class="text-center">
<th class="w-25" scope="col"></th>
<th style="width: 54%" scope="col"></th>
<th style="width: 10%" scope="col">Actual</th>
<th style="width: 1%;" scope="col">Status</th>
<th style="width: 10%" scope="col">Expected</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td class="text-center">2/13/2019</td>
<td class="text-center">
<div class="div-status-circle"></div>
</td>
<td class="text-center"></td>
</tr>
</tbody>
</table>
</div>
CSS:
.div-status-circle {
display: inline-block;
border-radius: 50%;
border: 1px solid #000;
width: 15px;
height: 15px;
content: "";
background: #737373;
}
Try this fiddle
Fiddle
.status-circle {
border-radius: 50%;
border: 1px solid #000;
width: 15px;
height: 15px;
background: #737373;
display: block;
margin: auto;
}
instead of using list element for a single item you can achieve this by using a div or span

CSS Line Dividor

I'm trying to organize two sets of information in a particular way. I have a very crude mock-up here:
https://imgur.com/a/LrSCg
I have everything working except for the diving line between the two sets of info. I've tried setting up the entire thing as a table and then setting the appropriate border styles, but that didn't work out so well.
Here's what I currently have that gets me everything except the middle dividing line:
<table style="margin: 0 auto; border: 1px solid black; table-layout: fixed">
<tr>
<td>
<img id="left_image" class="images" alt="left_image" height="auto" width="300" style="border: 2px solid #5b5b5b">
</td>
<td style="display:block;">
<div style="float: left; margin: 20px 0 0 20px;">
<table>
<tr>
<td style="width: 75px;">Name:</td><td><span id="left_name" style="font-weight: bold"></span></td>
</tr>
<tr>
<td style="width: 75px;">Category:</td>
<td><span id="left_category" style="font-weight: bold"></span></td>
</tr>
<tr>
<td style="width: 75px;">ID:</td>
<td><span id="left_id" style="font-weight: bold;"></span></td>
</tr>
</table>
</div>
<hr>
<div style="float: right; margin: 100px 20px 0 0;">
<table>
<tr>
<td style="width: 75px;">Name:</td>
<td><span id="right_name" style="font-weight: bold"></span></td>
</tr>
<tr>
<td style="width: 75px;">Category:</td>
<td><span id="right_category" style="font-weight: bold"></span></td>
</tr>
<tr>
<td style="width: 75px;">ID:</td>
<td><span id="right_id" style="font-weight: bold"></span></td>
</tr>
</table>
</div>
</td>
<td>
<img id="right_image" class="images" alt="right_image" height="auto" width="300" style="border: 2px solid #5b5b5b">
</td>
</tr>
<tr>
<td style="text-align: center;">
<button class="btn4 btn4-confirm" onclick="selectLeftID()">Select Left</button>
</td>
<td></td>
<td style="text-align: center;">
<button class="btn4 btn4-confirm" onclick="electRightID()">Select Right</button>
</td>
</tr>
</table>
This is just experimental code, it hasn't been cleaned up yet, so please ignore all the in-line styling.
Here's a sloppy example I threw together: https://jsfiddle.net/33pc23w0/2/
I would like to make the line in code and not use any images since I'd like the elements to be flexible in size. Any suggestions on the middle lines?
Here's a quick solution. I set the main container to relative position and added two absolute position divs with appropriate borders and dimensions to handle the dividers.
.main-container {
width: 800px;
position: relative;
}
.divider-top {
position: absolute;
width: 150px;
height: 150px;
left: 300px;
border: 2px solid black;
border-left: 0px;
border-top: 0px;
}
.divider-bottom {
position: absolute;
width: 150px;
height: 167px;
top: 150px;
left: 300px;
border: 0px;
border-left: 2px solid black;
}
.details_images {
display: block;
margin: auto;
margin-top: 5px;
margin-bottom: 5px;
border-radius: 10px;
}
.btn4 {
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
width: 150px;
height: 50px;
}
.btn4.focus,
.btn4:focus,
.btn4:hover {
color: #333;
text-decoration: none;
}
.btn4-confirm {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn4-confirm:active {
color: #fff;
background-color: #449d44;
border-color: #398439;
}
<div class="main-container">
<div class="divider-top"></div>
<div class="divider-bottom"></div>
<table style="width: 100%; border: 1px solid black; table-layout: fixed">
<tr>
<td>
<img id="left_image" class="images" alt="left_image" height="auto" width="200" src="https://catalogue.millsarchive.org/images/generic-icons/blank.png" style="border: 2px solid #5b5b5b">
</td>
<td style="display:block;">
<div style="float: left; margin: 20px 0 0 20px;">
<table>
<tr>
<td style="width: 75px;">Name:</td>
<td><span id="left_name" style="font-weight: bold">Blah</span></td>
</tr>
<tr>
<td style="width: 75px;">Category:</td>
<td><span id="left_category" style="font-weight: bold">Blah</span></td>
</tr>
<tr>
<td style="width: 75px;">ID:</td>
<td><span id="left_id" style="font-weight: bold;">Blah</span></td>
</tr>
</table>
</div>
<div style="float: right; margin: 100px 20px 0 0;">
<table>
<tr>
<td style="width: 75px;">Name:</td>
<td><span id="right_name" style="font-weight: bold">Blah</span></td>
</tr>
<tr>
<td style="width: 75px;">Category:</td>
<td><span id="right_category" style="font-weight: bold">Blah</span></td>
</tr>
<tr>
<td style="width: 75px;">ID:</td>
<td><span id="right_id" style="font-weight: bold">Blah</span></td>
</tr>
</table>
</div>
</td>
<td>
<img id="right_image" class="images" alt="right_image" height="auto" width="200" src="https://catalogue.millsarchive.org/images/generic-icons/blank.png" style="border: 2px solid #5b5b5b">
</td>
</tr>
<tr>
<td style="text-align: center;">
<button class="btn4 btn4-confirm" onclick="selectLeftID()">Select Left</button>
</td>
<td></td>
<td style="text-align: center;">
<button class="btn4 btn4-confirm" onclick="electRightID()">Select Right</button>
</td>
</tr>
</table>
</div>

Printing with CSS & fixed header/footer in Chrome: intermittent render issues

I'm trying to add some custom formatting to an e-commerce receipt for printing, with a fixed header and footer to appear on every page printed. The problem is, it seems to intermittently work. Sometimes it loads fine, others, the header appears near the middle of the page rather than at the top. Sometimes just canceling the print dialog box and reopening it has changed how it loads.
Examples:
Correct:
Incorrect:
Incorrect:
Is this some kind of chrome rendering issue?
Full code below:
body{
background: #FFFFFF;
font-size: 12pt;
}
.bold {
font-weight:bold;
}
.clr {
clear: both;
}
.invoice-title {
font-size: 14pt;
color:#734B3A;
margin:25px 0 15px 0;
font-family: Arial, Helvetica, sans-serif;
text-transform: uppercase;
}
table {
width: 100%;
}
th {
text-align: left;
border-bottom:1px solid #EEE;
}
.variation {
font-size: 11px;
}
#main_container {
width:100%;
margin:0 0 30px 0;
}
#main {
width:720px;
margin:auto;
}
#main .header_logo {
text-align: right;
margin:15px 0 15px 0;
font-size: 24px;
font-weight: bold;
color:#000000;
font-family: Arial, Helvetica, sans-serif;
}
#main .wrapper {
border:1px solid #EFECDC;
background-color:#FFFFFF;
}
#main .wrapper-table {
margin:0 0 0 0;
padding:25px 25px 25px 25px;
font-family:Arial, Helvetica, sans-serif;
}
.short_cell {
width: 90px;
}
#media all {
.page-break { display:none; }
}
#media print {
.page-break { display:block; page-break-before:always; }
.noprint { display: none; }
}
body{
margin-top: 145px;
}
#main .header_logo{
font-family: 'Sacramento', cursive;
color: #D79E32;
font-size: 3.5em;
font-weight: normal;
margin-bottom: 20px;
margin-top: 0px;
padding-top: 90px;
line-height: 0.6em;
padding-bottom: 10px;
border-bottom: #ade6df solid 10px;
position: fixed;
top: 0;
width: 715px;
background-color: #fff
}
#main .header_logo img{
max-height: 120px;
max-width: 120px;
float: left;
margin-top: -85px;
}
#main .wrapper{
border:none;
}
.footer {
background: #ade6df;
color: #fff;
text-align: center;
font-family: 'Open Sans', sans-serif;
padding: 5px 0;
font-weight: 300;
position: fixed;
bottom: 0;
width: 715px;
}
.footer a{
color: #fff;
text-decoration: none;
}
.footer .spacer {
font-size: 0.5em;
padding: 0 10px;
vertical-align: middle;
position: relative;
top: -2px;
}
.page-break{
height: 215px;
width: 100%;
}
.page-break:last-child{
display: none;
}
#media screen {
.footer {
bottom: 20px;
}
body{
margin-bottom: 30px;
}
}
<div style="main_container">
<div id="main">
<div class="header_logo">
<img src="/receipt_logo.jpg" alt="" />
My Company
</div>
<div class="clr"></div>
<div class="wrapper">
<div class="wrapper-table">
<table cellpadding="0" cellspacing="5" border="0" style="margin-left:5px;">
<tr>
<td class="invoice-title">Receipt</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><strong>Date:</strong> 9/13/2016</td>
</tr>
<tr>
<td><strong>Order Number:</strong> 123456789</td>
</tr>
<tr><td><strong>Email:</strong> email#email.com</td></tr><tr><td><strong>Phone:</strong> 585-123-4567</td></tr><tr><td><strong>newsletter subscribe:</strong> 0</td></tr> <tr>
<td>
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td valign="top" style="padding-right: 20px;"><strong>Invoice Address:</strong><br />
Jane J. Doe<br />123 Main Street<br />ANYTOWN, CA 12345<br />US<br /> </td>
<td valign="top"><strong>Shipping Address (Me):</strong><br />Jane J. Doe<br />123 Main Street<br />ANYTOWN, CA 12345<br />US<br />Method: Standard Shipping<br />Shipping: $6.99<br /> </td> </tr></table>
</td>
</tr>
</table>
<table cellpadding="5" cellspacing="5" border="0" style="margin-top:30px;">
<tr>
<th>Product</td>
<th class="short_cell">Price</td>
<th class="short_cell">Qty</td>
<th class="short_cell">Subtotal</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr class="page-break"></tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr style="margin-top:30px;">
<td> </td>
<td colspan="2" align="right">Shipping:</td>
<td class="short_cell bold">$6.99</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">LAWN:</td>
<td class="short_cell bold">-$8.70</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Total:</td>
<td class="short_cell bold">$56.27</td>
</tr>
</table>
</div>
</div>
<div class="footer">
My company<span class="spacer">●</span>mycompany.com<span class="spacer">●</span>888-111-1234<span class="spacer">●</span>info#mycompany.com
</div>
</div>
</div>
<div class="page-break"></div>
There is .footer { position: fixed; } directive. I made it a HTML file with your CSS. I checked with Safari print, now that info is coming. But you need adjustment of padding, margin etc. Also footer div class is does not sound good near navigation. Also add that color on print CSS part, else it will be on white background. Here is the raw gist with what probably you wanted -- https://gist.githubusercontent.com/AbhishekGhosh/ddb08179d238ec36f48ee467e4916d42/raw/16e761809f357ba0d2ac085bc6746487451db3d4/stack0410.html . Save it as HTML file and open on your browser.
Note : Edited.
<!DOCTYPE html>
<html>
<head>
<title>This is a title</title>
<style>body{
background: #FFFFFF;
font-size: 12pt;
}
.bold {
font-weight:bold;
}
.clr {
clear: both;
}
.invoice-title {
font-size: 14pt;
color:#734B3A;
margin:25px 0 15px 0;
font-family: Arial, Helvetica, sans-serif;
text-transform: uppercase;
}
table {
width: 100%;
}
th {
text-align: left;
border-bottom:1px solid #EEE;
}
.variation {
font-size: 11px;
}
#main_container {
width:100%;
margin:0 0 30px 0;
}
#main {
width:720px;
margin:auto;
}
#main .header_logo {
text-align: right;
margin:15px 0 15px 0;
font-size: 24px;
font-weight: bold;
color:#000000;
font-family: Arial, Helvetica, sans-serif;
}
#main .wrapper {
border:1px solid #EFECDC;
background-color:#FFFFFF;
}
#main .wrapper-table {
margin:0 0 0 0;
padding:25px 25px 25px 25px;
font-family:Arial, Helvetica, sans-serif;
}
.short_cell {
width: 90px;
}
#media all {
.page-break { display:none; }
}
#media print {
.page-break { display:block; page-break-before:always; }
.noprint { display: none; }
}
body{
margin-top: 145px;
}
#main .header_logo{
font-family: 'Sacramento', cursive;
color: #D79E32;
font-size: 3.5em;
font-weight: normal;
margin-bottom: 20px;
margin-top: 0px;
padding-top: 90px;
line-height: 0.6em;
padding-bottom: 10px;
border-bottom: #ade6df solid 10px;
position: fixed;
top: 0;
width: 715px;
background-color: #fff
}
#main .header_logo img{
max-height: 120px;
max-width: 120px;
float: left;
margin-top: -85px;
}
#main .wrapper{
border:none;
}
.footer {
background: #ade6df;
color: #fff;
text-align: center;
font-family: 'Open Sans', sans-serif;
padding: 5px 0;
font-weight: 300;
#position: fixed;
bottom: 0;
width: 715px;
}
.footer a{
color: #fff;
text-decoration: none;
}
.footer .spacer {
font-size: 0.5em;
padding: 0 10px;
vertical-align: middle;
position: relative;
top: -2px;
}
.page-break{
height: 215px;
width: 100%;
}
.page-break:last-child{
display: none;
}
#media screen {
.footer {
bottom: 20px;
}
body{
margin-bottom: 30px;
}
}</style>
</head>
<body>
<div style="main_container">
<div id="main">
<div class="header_logo">
<img src="/receipt_logo.jpg" alt="" />
My Company
</div>
<div class="clr"></div>
<div class="wrapper">
<div class="wrapper-table">
<table cellpadding="0" cellspacing="5" border="0" style="margin-left:5px;">
<tr>
<td class="invoice-title">Receipt</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><strong>Date:</strong> 9/13/2016</td>
</tr>
<tr>
<td><strong>Order Number:</strong> 123456789</td>
</tr>
<tr><td><strong>Email:</strong> email#email.com</td></tr><tr><td><strong>Phone:</strong> 585-123-4567</td></tr><tr><td><strong>newsletter subscribe:</strong> 0</td></tr> <tr>
<td>
<table cellpadding="0" cellspacing="0" border="0"><tr>
<td valign="top" style="padding-right: 20px;"><strong>Invoice Address:</strong><br />
Jane J. Doe<br />123 Main Street<br />ANYTOWN, CA 12345<br />US<br /> </td>
<td valign="top"><strong>Shipping Address (Me):</strong><br />Jane J. Doe<br />123 Main Street<br />ANYTOWN, CA 12345<br />US<br />Method: Standard Shipping<br />Shipping: $6.99<br /> </td> </tr></table>
</td>
</tr>
</table>
<table cellpadding="5" cellspacing="5" border="0" style="margin-top:30px;">
<tr>
<th>Product</td>
<th class="short_cell">Price</td>
<th class="short_cell">Qty</td>
<th class="short_cell">Subtotal</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr class="page-break"></tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$24.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$24.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$7.99</td>
<td class="short_cell">1</td>
<td class="short_cell">$7.99</td>
</tr>
<tr>
<td><div>Product goes here</div><div class="variation">Ship To: Me</div></td>
<td class="short_cell">$25.00</td>
<td class="short_cell">1</td>
<td class="short_cell">$25.00</td>
</tr>
<tr style="margin-top:30px;">
<td> </td>
<td colspan="2" align="right">Shipping:</td>
<td class="short_cell bold">$6.99</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">LAWN:</td>
<td class="short_cell bold">-$8.70</td>
</tr>
<tr>
<td> </td>
<td colspan="2" align="right">Total:</td>
<td class="short_cell bold">$56.27</td>
</tr>
</table>
</div>
</div>
<div class="footer">
My company<span class="spacer">●</span>mycompany.com<span class="spacer">●</span>888-111-1234<span class="spacer">●</span>info#mycompany.com
</div>
</div>
</div>
<div class="page-break"></div>
</body>
</html>

Resources