How to prevent overflow of div content - html

I have a html that when the window shrinks, the content of sub divs gets cutoff. Even though the outermost div is overflow:auto, and there is a scroll bar..
I notice that overflow:hidden is set in multiple child divs. The thing is the inner html are generated from some API and it would impractical to reset all these overflow properties.
My question is:
the height/width of these child divs are not set, why the overflow property still applies?
is there another way to prevent cutoff in child div? Like making sure the parent div has enough height?
Below is a simplified version of my html:
<div id="main" style="width: 100%; height: 100%; overflow: auto; -ms-zoom: 1;" abp="1">
<div style="box-sizing:border-box">
<div style="overflow:hidden;text-align:left">
<div id="SecListA" style="width: 100%; height: 100%; overflow: hidden; position: relative;">
<div>
<span class="ttl" id="sectKey-18-HL" style="font-size: 20px; font-weight: 600;" abp="373">Section A</span>
</div>
</div>
</div>
</div>
<div style="box-sizing:border-box">
<div style="overflow:hidden;text-align:left">
<div id="SecListB" style="width: 100%; height: 100%; overflow: hidden; position: relative;">
<div>
<span class="ttl" id="sectKey-18-HL" style="font-size: 20px; font-weight: 600;" abp="373">Section B</span>
</div>
<table class="skTbl" id="MRLTable-CVIntList280">
<thead abp="416">
<tr class="visHid colHdr" abp="417">
<th class="rIndent" abp="418"></th>
<th class="hlImp" style="width: 96%;" abp="419"></th>
<th style="width: 1%;"></th>
<th style="width: 1%;"></th>
<th style="width: 1%;"></th>
<th style="width: 1%;"></th>
</tr>
</thead>
<tbody abp="424">
<tr style="display: none;" abp="425">
<td abp="426"></td>
</tr>
<tr>
<td abp="428"></td>
<td abp="429">
<div style="padding-left: 0px; display: inline-block;" abp="430"><span class="vbIcn icn icnMan" abp="431"><img src="C:\PROGRAM FILES (X86)\Y.png" abp="432"></span></div> subtitle A
</td>
<td abp="433">
<span abp="434"></span>
</td>
<td abp="435"><span abp="436"></span></td>
<td abp="437"><span class="MRLRecFldHover" abp="438"></span></td>
<td abp="439"><span class="MRLRecFldHover" abp="440"></span></td>
</tr>
<tr title="Edit this item">
<td abp="442"></td>
<td class="hlImp titleField hlImp" abp="443"><span tabindex="0"><div style="padding-left: 20px; display: inline-block;" abp="445"><span class="vbIcn icn icnMan"><img src="C:\PROGRAM FILES (X86)\X.png"></span></div> paragrah A</span>
</td>
<td abp="448"><span></span></td>
<td abp="450"><span></span></td>
<td abp="452"><span></span></td>
<td abp="454"><span><span class="itAct" abp="456"><span title="Remove this set" style="padding: 0px 24px 16px 8px; vertical-align: top;"><span class="vbIcn icn icnDelete" abp="458"></span></span>
</span>
</span>
</td>
</tr>
<tr>
<td></td>
<td colspan="5">
<table class="skForceFitTbl skTbl" cellspacing="0" cellpadding="0" abp="462">
<tbody abp="463">
<tr class="noLn" abp="464">
<td class="skForceFitCell" abp="465">
<span abp="466">
<table style="width: 100%; border-collapse: collapse; -ms-overflow-y: hidden;">
<tbody abp="468">
<tr abp="469">
<td style="padding-left: 40px;" abp="470"></td>
<td style="width: 100%; text-align: left;" abp="471">
<span style="font-family: 'Segoe UI'; font-size: 14px; font-weight: normal;">
some text for the ssdfasdfdsfffffffffffffffffffffffffffffffffffffffffffffffffffff. <br>dddddd
</span>
</td>
</tr>
</tbody>
</table>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr style="display: none;" abp="425">
<td abp="426"></td>
</tr>
<tr>
<td abp="428"></td>
<td abp="429">
<div style="padding-left: 0px; display: inline-block;" abp="430"><span class="vbIcn icn icnMan" abp="431"><img src="C:\PROGRAM FILES (X86)\Y.png" abp="432"></span></div> subtitle B
</td>
<td abp="433">
<span abp="434"></span>
</td>
<td abp="435"><span abp="436"></span></td>
<td abp="437"><span class="MRLRecFldHover" abp="438"></span></td>
<td abp="439"><span class="MRLRecFldHover" abp="440"></span></td>
</tr>
<tr title="Edit this item">
<td abp="442"></td>
<td class="hlImp titleField hlImp" abp="443"><span tabindex="0"><div style="padding-left: 20px; display: inline-block;" abp="445"><span class="vbIcn icn icnMan"><img src="C:\PROGRAM FILES (X86)\X.png"></span></div> paragrah A</span>
</td>
<td abp="448"><span></span></td>
<td abp="450"><span></span></td>
<td abp="452"><span></span></td>
<td abp="454"><span><span class="itAct" abp="456"><span title="Remove this set" style="padding: 0px 24px 16px 8px; vertical-align: top;"><span class="vbIcn icn icnDelete" abp="458"></span></span>
</span>
</span>
</td>
</tr>
<tr>
<td></td>
<td colspan="5">
<table class="skForceFitTbl skTbl" cellspacing="0" cellpadding="0" abp="462">
<tbody abp="463">
<tr class="noLn" abp="464">
<td class="skForceFitCell" abp="465">
<span abp="466">
<table style="width: 100%; border-collapse: collapse; -ms-overflow-y: hidden;">
<tbody abp="468">
<tr abp="469">
<td style="padding-left: 40px;" abp="470"></td>
<td style="width: 100%; text-align: left;" abp="471">
<span style="font-family: 'Segoe UI'; font-size: 14px; font-weight: normal;">
some text for the testing. This text will get cutoff when the window is small enough.... <br>dddddd
</span>
</td>
</tr>
</tbody>
</table>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr title="Edit this item">
<td abp="442"></td>
<td class="hlImp titleField hlImp" abp="443"><span tabindex="0"><div style="padding-left: 20px; display: inline-block;" abp="445"><span class="vbIcn icn icnMan"><img src="C:\PROGRAM FILES (X86)\X.png"></span></div> paragrah B</span>
</td>
<td abp="448"><span></span></td>
<td abp="450"><span></span></td>
<td abp="452"><span></span></td>
<td abp="454"><span><span class="itAct" abp="456"><span title="Remove this set" style="padding: 0px 24px 16px 8px; vertical-align: top;"><span></span></span>
</span>
</span>
</td>
</tr>
<tr>
<td></td>
<td colspan="5">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<span>
<table style="width: 100%; border-collapse: collapse; -ms-overflow-y: hidden;">
<tbody abp="468">
<tr abp="469">
<td style="padding-left: 40px;" abp="470"></td>
<td style="width: 100%; text-align: left;" abp="471">
<span style="font-family: 'Segoe UI'; font-size: 14px; font-weight: normal;">
some text for the testing. This text will get cutoff when the window is small enough.... <br>dddddd
</span>
</td>
</tr>
</tbody>
</table>
</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

Thats just how overflow works. If you set it to hidden on a div, any content that flows outside of its boundaries, regardless of what makes it flow outside, it gets clipped.
Ideally the proper solution would be to change the markup. However, if you really can't, you can hack it with css using !important:
#main div {
overflow: initial !important;
}
#main {
width: initial !important;
overflow: initial !important;
}
div#SecListB {
overflow: initial !important;
}
Check out a fiddle here.

This text...
some text for the ssdfasdfdsfffffffffffffffffffffffffffffffffffffffffffffffffffff.
is most likely the cause (it appears several times). It contains one extremely long "word" which forces the table-cell which is in to be extended. But that's completely unrealistic. Use real text with real word lenghts, this will change the whole scenario.
(If you don't want to type text, just google "blindtext generator" - there are pages that generate random text for you which you can copy.)

Related

Hot to make multiple element both on the left side and right side on html email?

It should support for html email, so I can't use justify-content and align-items.
I try to use position: absolute for <img />, but It's not working on html email ?
Hot do I make the Twitter icon on the left side and on the same line with 1 2 3 for html email ?
<div
class="footer-container"
style="
position: relative;
background: pink;
position: fixed;
bottom: 0;
width: 100%;"
>
<!-- position is not working on html email -->
<div
class="image-container"
style="position: absolute; top: 30px; left: 24px"
>
<img
src="https://www.citypng.com/public/uploads/preview/-516139511470ymv2hndq6.png"
alt="test"
width="94"
/>
</div>
<div
class="centered"
style="padding-top: 40px; padding-bottom: 40px; padding-right: 30px; text-align:right;"
>
<a>1</a>
<a>2</a>
<a>3</a>
</div>
</div>
In email-templates you have limited support and as such sue techniques that are outdated or would not be semantically correct for normal HTML files.
In this case, you should use a table for layout purposes. You can shrink the table cells to their minimum content by using: style="width: 0; white-space: nowrap;"
<table width="100%">
<tr>
<td>
<img src="https://www.citypng.com/public/uploads/preview/-516139511470ymv2hndq6.png" alt="test" width="94">
</td>
<td style="width: 0; white-space: nowrap;">
<a>1</a>
</td>
<td style="width: 0; white-space: nowrap;">
<a>2</a>
</td>
<td style="width: 0; white-space: nowrap;">
<a>3</a>
</td>
</tr>
</table>
People forget that HTML email Table can be treated as a "grid" layout by using colspan (and rowspan as well). Usually a grid of 6 columns fits best for most of the cases. Knowing you have such a grid, the top row can be constructed as such colspans, and by using text-align:
<style>
td {
border: 1px solid #ddd;
padding: 1rem;
}
</style>
<table cellspacing="0" cellpadding="0" border="0" style="width: 100%; table-layout: fixed; border-collapse: collapse; border: 0px;border-spacing: 0;">
<tbody>
<tr>
<td colspan="2">
<img src="https://i.stack.imgur.com/q9TPY.png" alt="logo" style="display: block; vertical-align: middle; border: 0;" width="57" height="48">
</td>
<td colspan="4" style="text-align: right;">
Link 1
Link 2
Link 3
</td>
</tr>
<tr>
<td colspan="6" style="text-align: center; background: gold;"><br><br>6<br><br><br></td>
</tr>
<tr>
<td colspan="3">3</td>
<td colspan="3">3</td>
</tr>
<tr>
<td colspan="2">2</td>
<td colspan="2">2</td>
<td colspan="2">2</td>
</tr>
<tr>
<td colspan="5" style="text-align: center; background: #567; color:#fff;">5</td>
<td colspan="1" style="text-align: center; background: #456; color:#fff;">1</td>
</tr>
</tbody>
</table>

td width not apply when table wrapped with div with specific width and overflow is applied

With the below html, I am not able to add width of td element
here table is wrapped with div and it's width is 200px and overflow-x is given.
<div class="scroll" style="width: 200px; overflow-x: overlay;">
<table class="scrollable">
<tbody>
<tr>
<td width="100" data-index="0" style="width: 118px;">-0.29%</td>
<td data-index="1">-0.26%</td>
<td data-index="2">-0.20%</td><td data-index="3">-0.15%</td>
<td data-index="4">-0.09%</td><td data-index="5">0.19%</td>
<td data-index="6">0.54%</td><td data-index="7">0.95%</td>
<td data-index="8">1.33%</td><td data-index="9">1.67%</td>
<td data-index="10">1.97%</td><td data-index="11">2.22%</td>
<td data-index="12">2.44%</td><td data-index="13">2.62%</td>
<td data-index="14">2.78%</td>
</tr>
</tbody>
</table>
</div>
Try changing the display property of <td> to display:inline-block.
Also you should add this table { width: max-content; } to your CSS so your table can fit all the <td> now that they are bigger.
table {
width: max-content;
}
td {
width: 100px;
display: inline-block;
}
<div class="scroll" style="
width: 200px;
overflow-x: auto;
">
<table class="scrollable">
<tbody>
<tr>
<td data-index="0">-0.29%</td>
<td data-index="1">-0.26%</td>
<td data-index="2">-0.20%</td>
<td data-index="3">-0.15%</td>
<td data-index="4">-0.09%</td>
<td data-index="5">0.19%</td>
<td data-index="6">0.54%</td>
<td data-index="7">0.95%</td>
<td data-index="8">1.33%</td>
<td data-index="9">1.67%</td>
<td data-index="10">1.97%</td>
<td data-index="11">2.22%</td>
<td data-index="12">2.44%</td>
<td data-index="13">2.62%</td>
<td data-index="14">2.78%</td>
</tr>
</tbody>
</table>
</div>

Remove unwanted spacing ( ) between 2 table elements

I need to create a page layout with <table> elements. The problem I have that it's being auto generated in the DOM extra unwanted spacing, in the form of &nbsp. How can I remove it?
See Images:
Results:
The Challenge:
The challenge I have. I can only use inline styles & no javascript & I cannot use flex instead of tables. Since it's going to be used in emails. and not all email clients support flex yet.
<div style="width:375px;margin:0 auto;font-family: Helvetica,sans-serif;">
<table style="width:100%;background-color: aliceblue;border-bottom: 1px #539ecb solid;
border-top: 1px #539ecb solid;color: #334859; text-transform: uppercase;padding:0 15px;">
<!-- Entries Header -->
<tr>
<td style="padding:3px 0;width: 47%;">
<h5 style="margin:0;">Description</h5>
</td>
<td style="text-align: center;width: 25%;">
<h5 style="margin:0;">Qty</h5>
</td>
<td style="text-align: right;">
<h5 style="margin:0;">Amount</h5>
</td>
</tr>
</table>
<table style="width: 100%;padding:0 15px;">
<!-- Entries -->
<tr>
<td style="padding:5px 0;width: 50%;">
<span style="text-transform: uppercase;font-size: 13px;">Office desk</span>
</td>
<td style="padding:5px 0;text-align: center;width: 25%;">
<small style="margin: 0;font-size: 11px;">2 x $217.75</small>
</td>
<td style="padding:5px 0;text-align:right;">
<span style="margin: 0;font-size: 13px;">$435.50</span>
</td>
</tr>
</table>
</div>
It seems like the issue is the s you intentionally added within the table. HTML has strict rules about what can and can't be a direct child of the various table elements.
A text node can't be the direct child of a tr, which can contain only:
Zero or more td, th, and script-supporting elements.
Therefore, the text nodes get pushed outside the table. Remove those, and the visual layout will be fixed (I'd still recommend fixing the semantics of the markup, though).
Original answer below
Your HTML is malformed in any case. What looks to be a table header row and body row are represented as 2 separate tables. Try something like this:
<table style="border-collapse: collapse;">
<thead style="/* styles from what's currently your first table */">
<tr>
<!-- content from what's currently your first table -->
<th>...</th>
<th>...</th>
<th>...</th>
</tr>
</thead>
<tbody style="/* styles from what's currently your second table */">
<tr>
<!-- content from what's currently your second table -->
<td>...</td>
<td>...</td>
<td>...</td>
</tr>
</tbody>
</table>
You can replace the s with empty string.
document.querySelector("#our_div").innerHTML = document.querySelector("#our_div").innerHTML.replace(/ /g, '');
<div id="our_div" style="width:375px;margin:0 auto;font-family: Helvetica,sans-serif;display:block;">
<table style="width:100%;background-color: aliceblue;border-bottom: 1px #539ecb solid;
border-top: 1px #539ecb solid;color: #334859; text-transform: uppercase;padding:0 15px;">
<!-- Entries Header -->
<tr>
<td style="padding:3px 0;width: 47%;">
<h5 style="margin:0;">Description</h5>
</td>
<td style="text-align: center;width: 25%;">
<h5 style="margin:0;">Qty</h5>
</td>
<td style="text-align: right;">
<h5 style="margin:0;">Amount</h5>
</td>
</tr>
</table>
<table style="width: 100%;padding:0 15px;">
<!-- Entries -->
<tr>
<td style="padding:5px 0;width: 50%;">
<span class="item-name" style="text-transform: uppercase;font-size: 13px;">Office desk</span>
</td>
<td style="padding:5px 0;text-align: center;width: 25%;">
<small class="qty" style="margin: 0;font-size: 11px;">2 x $217.75</small>
</td>
<td style="padding:5px 0;text-align:right;">
<span class="item-price" style="margin: 0;font-size: 13px;">$435.50</span>
</td>
</tr>
</table>
</div>
Here is pure CSS solution. Adjust font-size:0 to div and font-size:1rem to tables. CSS can't remove it, but can hide.
#our_div {
font-size:0;
}
#our_div table {
font-size:1rem;
}
<div id="our_div" style="width:375px;margin:0 auto;font-family: Helvetica,sans-serif;font-size:0;">
<table style="width:100%;background-color: aliceblue;border-bottom: 1px #539ecb solid;
border-top: 1px #539ecb solid;color: #334859; text-transform: uppercase;padding:0 15px;">
<!-- Entries Header -->
<tr>
<td style="padding:3px 0;width: 47%;">
<h5 style="margin:0;">Description</h5>
</td>
<td style="text-align: center;width: 25%;">
<h5 style="margin:0;">Qty</h5>
</td>
<td style="text-align: right;">
<h5 style="margin:0;">Amount</h5>
</td>
</tr>
</table>
<table style="width: 100%;padding:0 15px;">
<!-- Entries -->
<tr>
<td style="padding:5px 0;width: 50%;">
<span class="item-name" style="text-transform: uppercase;font-size: 13px;">Office desk</span>
</td>
<td style="padding:5px 0;text-align: center;width: 25%;">
<small class="qty" style="margin: 0;font-size: 11px;">2 x $217.75</small>
</td>
<td style="padding:5px 0;text-align:right;">
<span class="item-price" style="margin: 0;font-size: 13px;">$435.50</span>
</td>
</tr>
</table>
</div>
It would be far better to do that with JS. In CSS you can try to set some font styles for the div container to hide the " " characters and set the styles to their initial values for the tables (so they do not inherit values from the container).
div{
font-size:0;
line-height:0;
color: transparent;
user-select: none;
}
div>table{
font-size: 16px; //or any other
line-height: normal; //or any other
color: black; //or any other
user-select: auto;
}

bootstrap grid doesn't align the same way as a <table>

I'm trying to convert from table to bootstrap grid for mobile comparability. Below is an image of both of them on one page but even though they both follow the same css, bootstrap isn't at the center unlike table is. Can someone please explain this to me because this makes no sense.
Thank you
table is at the top and Bootstrap is at the bottom
and here's my HTML
.platinum2 {
color: #FFFFFF;
font-size: 30px;
font-weight: 600;
line-height: 41px;
text-align: center;
}
.package_text {
color: #FFFFFF;
font-family: "lato";
font-size: 14px;
font-weight: 500;
line-height: 26px;
}
.package_price {
color: #FFFFFF;
font-family: "lato";
font-size: 16px;
font-weight: bold;
line-height: 14px;
text-align: center;
}
.glyphicon-star{
font-size: 20px;
}
<div class="row" style="width:50%;margin-left:25% ; margin-bottom:25px; text-align:center">
<h1 class="platinum2">Platinum <br><span class="glyphicon glyphicon-star" style="color:#FFFACC" /><span class="glyphicon glyphicon-star" style="color:#FFFACC" /><span class="glyphicon glyphicon-star" style="color:#FFFACC" /> </h1>
<div class="col-md-6" >
<span class="package_text">Hand Wash<br>Full Interior<br>Complete Vacuum<br>Leather Clean+Shine<br>
<br />
Tire Dressing<br>Tire and Rim Detailing<br>Engine Shampoo<br />
<br /></span>
<span class="package_price"> Cars: $189</span>
</div>
<div class="col-md-6">
<span class="package_text">Roof Liner<br>Full Body Wax<br>Clay Bar Treatment<br>Interior Shampooing<br />
<br />
Complete Detail<br>In & Out Windows<br>Door Jam Cleaning<br />
<br /></span>
<span class="package_price">SUVs: $199</span>
</div>
</div>
</div>
<div class="container" style="background-image:url('/images/StripedBGDetailPackages.png' ); align-items:center; text-align:center; margin-top:25px; padding-top:25px; background-size:100%" >
<table style="width:50%;margin-left:25% ; margin-right:25%; margin-bottom:25px;">
<tr>
<td class="platinum2">Gold</td>
<td class="platinum2">Silver</td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-star" style="color:#FFFACC" /><span class="glyphicon glyphicon-star" style="color:#FFFACC" /></td>
<td><span class="glyphicon glyphicon-star" style="color:#FFFACC" /></td>
</tr>
<tr>
<td class="package_text">Hand Wash</td>
<td class="package_text">Hand Wash</td>
</tr>
<tr>
<td class="package_text">Complete Vacuum</td>
<td class="package_text">Clay Bar Treatment</td>
</tr>
<tr>
<td class="package_text">Interior Shampooing</td>
<td class="package_text">Complete Body Wax</td>
</tr>
<tr>
<td class="package_text">Leather Clean+Shine</td>
<td class="package_text">Tire and Rim</td>
</tr>
<tr>
<td class="package_text">Complete Deetail</td>
<td class="package_text">Detailing</td>
</tr>
<tr>
<td class="package_text">In & Out Windows</td>
<td class="package_text">Tire Dressing</td>
</tr>
<tr class="package_text">
<td> </td>
<td> </td>
</tr>
<tr>
<td class="package_price">Cars:$119 SUVs:$129</td>
<td class="package_price">Cars:$99 SUVs:$109</td>
</tr>
</table>
<div class="row" style="width:50%;margin-left:25% ; margin-right:25%; margin-bottom:25px;">
<div class="col-md-6">
<table>
<tr>
<td class="platinum2">Gold</td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-star" style="color:#FFFACC" /><span class="glyphicon glyphicon-star" style="color:#FFFACC" /></td>
</tr>
<tr>
<td class="package_text">Hand Wash</td>
</tr>
<tr>
<td class="package_text">Complete Vacuum</td>
</tr>
<tr>
<td class="package_text">Interior Shampooing</td>
</tr>
<tr>
<td class="package_text">Leather Clean+Shine</td>
</tr>
<tr>
<td class="package_text">Complete Deetail</td>
</tr>
<tr>
<td class="package_text">In & Out Windows</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td class="package_price">Cars:$119 SUVs:$129</td>
</tr>
</table>
</div>
<div class="col-md-6">
<table>
<tr>
<td class="platinum2">Silver</td>
</tr>
<tr>
<td><span class="glyphicon glyphicon-star" style="color:#FFFACC" /></td>
</tr>
<tr>
<td class="package_text">Hand Wash</td>
</tr>
<tr>
<td class="package_text">Clay Bar Treatment</td>
</tr>
<tr>
<td class="package_text">Complete Body Wax</td>
</tr>
<tr><td class="package_text">Tire and Rim</td></tr>
<tr><td class="package_text">Detailing</td></tr>
<tr><td class="package_text">Tire Dressing</td></tr>
<tr><td> </td></tr>
<tr><td class="package_price">Cars:$99 SUVs:$109</td></tr>
</table>
</div>
</div>
To debug, first I added the following since your text are white, and border to everything with 1px solid red color, by doing this it is very easy to see why it is not centered! check the link
body {
background-color: gray;
}
* {
border: 1px solid red;
}
https://jsfiddle.net/dalinhuang/aLpv8k3f/4/
Now, as you can see Gold BS it is in the correct position, that's because
you need only add the following class to your <table class="fullwidth">
.fullwidth {
width: 100%;
}
OK, full solution, remove the debug stuff we added:
https://jsfiddle.net/dalinhuang/aLpv8k3f/5/
Also I think your star are not in the same line, update your .glyphicon-star to add this margin-top: -1px;.
.glyphicon-star {
font-size: 20px;
margin-top: -1px;
}

Responsive Email (Outlook 2016) issues

I used this responsive email template to design a tabular report email template but unfortunately it renders horribly on outlook desktop 2016.
I'll appreciate any form of help I can get to make my template look better on outlook desktop.
Here is the code snippet for the tabular area of the template:
<tr>
<td align="center" valign="top">
<!-- CENTERING TABLE // -->
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center" valign="top">
<!-- FLEXIBLE CONTAINER // -->
<table border="0" cellpadding="5" cellspacing="0" width="600" class="flexibleContainer">
<tr>
<td align="center" valign="top" width="600" class="flexibleContainerCell" style="background-color:#dd4f05;">
<!-- CONTENT TABLE // -->
<table border="0" cellpadding="10" cellspacing="0" width="100%" style='table-layout:fixed'>
<thead style="color: #ffffff; line-height: 200%; font-family:Tahoma,Verdana,Segoe,sans-serif; font-size: 15px; margin-top: 3px; margin-bottom: 3px; text-align: right; font-weight: bold">
<col width=6 />
<col width=10 />
<col width=6 />
<tr>
<th align="left">Category</th>
<th>Novemeber Spend</th>
<th align="left">Vs October </th>
</tr>
</thead>
<tbody style="color: #ffffff; line-height: 200%; font-family: Tahoma,Verdana,Segoe,sans-serif; font-weight: normal; margin-top: 3px; margin-bottom: 3px; text-align: left;">
<tr>
<td style="font-size: 20px;" align="left">Food</td>
<td align="right" style="font-size: 30px;">₦1,234,567.00</td>
<td align="right">
<div style="font-size: 25px;color: #008000; float: left">▲</div>
<p style="float: left; margin: 0; font-size: 20px">23%</p>
</td>
</tr>
<tr>
<td style="font-size: 20px;" align="left">Gadgets</td>
<td align="right" style="font-size: 30px;">₦901,234.00</td>
<td align="right">
<div style="font-size: 25px;color: #008000; float: left">▲</div>
<p style="float: left; margin: 0; font-size: 20px">74%</p>
</td>
</tr>
<tr>
<td style="font-size: 20px;" align="left">Entertainment</td>
<td align="right" style="font-size: 30px;">₦789,012.00</td>
<td align="right">
<div style="font-size: 25px;color: #008000; float: left">▲</div>
<p style="float: left; margin: 0; font-size: 20px">23%</p>
</td>
</tr>
<tr>
<td style="font-size: 20px;" align="left">School Fees</td>
<td align="right" style="font-size: 30px;">₦567,890.00</td>
<td align="right">
<div style="font-size: 25px;color: #008000; float: left">▲</div>
<p style="float: left; margin: 0; font-size: 20px">10%</p>
</td>
</tr>
<tr>
<td style="font-size: 20px;" align="left">Health Care</td>
<td align="right" style="font-size: 30px;">₦ 345,678.00</td>
<td align="right">
<div style="font-size: 25px;color: #008000; float: left">▲</div>
<p style="float: left; margin: 0; font-size: 20px">6%</p>
</td>
</tr>
</tbody>
</table>
<!-- // CONTENT TABLE -->
</td>
</tr>
</table>
<!-- // FLEXIBLE CONTAINER -->
</td>
</tr>
</table>
<!-- // CENTERING TABLE -->
</td>
</tr>
How it looks on web version of gmail and yahoo:
How it looks on outlook desktop client (Horrible):
I strongly suggest using display: inline-block as floats do not work at all with Outlook. This is a great reference as to what does and does not work with emails.
I would suggest changing the in that last column to a span, remove the float: left from both it and the paragraph - in fact, remove the paragraph tag entirely, and add font-size to the tag, which should be left aligned, not right. You're giving too many contradictory instructions for poor little Outlook to follow.