Using T-SQL to replace HTML in table not working - tsql

I'm trying to do a replace to get some unwanted content out of our Sitefinity Content blocks. To do this I've created a script to replace a term with an empty string. See for yourself:
DECLARE #SearchText nvarchar(512),
#ReplaceText nvarchar(512)
SET #SearchText = '%<img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" />%';
SET #ReplaceText = '';
select * from sf_control_properties where val like #SearchText
update sf_control_properties set val = REPLACE(val, #SearchText, #ReplaceText)
It does find the content when I run the select, but the replace function doesn't seem to be doing much. I have no clue what is going on, can someone spot the error?
An example database value that should be replaced is below.
<p>Europe’s universities are increasingly developing partnerships in their research and innovation missions, embracing the “Open Innovation model” of university-business collaboration and seeking to embed this is in sound project management and improved intellectual property management that reflects respective interests.</p> <p>The Responsible Partnering Initiative has been developed through close collaboration between EUA, the European Industrial Research Management Association (EIRMA), the European Association of Research and Technology Organisations (EARTO) and the European Network of Knowledge Transfer Offices linked to Universities and Public Research Organisations (ProTon Europe).<br /> <br />
The origins of the <a sfref="[documents]47af5eca-84b9-6a87-9ce5-ff00009465c7" href="/Libraries/research/2004_Responsible_Partnering_-_ConferenceReportFinal.pdf?sfvrsn=0" target="_blank">Responsible Partnering Initiative</a> <img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" /> date back to a major Conference which was held in 2004 which brought together the main stakeholders from universities, industry and public research organisations. As a result of the conference, a handbook based on good practices in university/industry collaborative research was published in 2005, entitled “<a sfref="[documents]4daf5eca-84b9-6a87-9ce5-ff00009465c7" href="/Libraries/research/2005_Responsible_Partnering_rp-2005-v102_2.pdf?sfvrsn=0" target="_blank">Responsible Partnering: Joining Forces in a World of Open Innovation</a>”. <img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" /></p> <p>A guide to better practices for collaborative research and knowledge transfer between science and industry, the Responsible Partnering Handbook was designed to help senior managers in the public and private sectors responsible for the creation, transfer and application of knowledge. It is seen as a useful step in the process of facilitating more regular interactions between European universities and industry, of building trust and establishing mutually beneficial relations, while respecting each others' core objectives.<br /> <br />
The Responsible Partnering Guidelines cover core areas that are crucial to university/industry collaboration concerning aligning interests, professional training and skills, consortia-building, intellectual property rights and patents and finally, importantly, building lasting relationships in collaborative research. The guidelines have been recognised as a pioneering European initiative in various European Commission Communications on improving knowledge transfer and the management of intellectual property rights, and have been recommended strongly for further implementation by the “<a sfref="[documents]71af5eca-84b9-6a87-9ce5-ff00009465c7" href="/Libraries/research/aho_report.pdf?sfvrsn=0" target="_blank">Aho Report on Creating an Innovative Europe</a>”. <img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" /></p> <p>The Responsible Partnering Guidelines is a “living document” that is revised regularly in the light of further evidence of good practices and to address new issues in university-business research collaboration. Revisions have been made through “validation workshops” organised with the support from the European Commission DG Research, to gain critical feedback on their strengths and weaknesses and potential for further development and implementation. Workshop participants were drawn from universities, industry (both large and small business enterprises), public research organisations, knowledge transfer offices and other interested parties. A Special Conference was held in Lisbon, Portugal in December 2007, and the report from the conference is available <a sfref="[documents]d7b05eca-84b9-6a87-9ce5-ff00009465c7" href="/Libraries/research/Responsible_Partnering_-_2007_Lisbon_Conference.pdf?sfvrsn=0" target="_blank">here</a> <img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" />. </p> <p>In October 2009 a fully revised <a sfref="[documents]b3ad5eca-84b9-6a87-9ce5-ff00009465c7" href="/Libraries/publications-homepage-list/Responsible_Partnering_Guidelines_09.pdf?sfvrsn=0">'Responsible Partnering Guidelines'</a> <img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" />was published which include issues such as State Aid, European Community recommendations on IPR management and the results of the EUA DOC-CAREERS project on university-industry partnerships in doctoral research. The Steering Group for the Responsible Partnering Initiative contributes currently also to the <strong>EC-initiated University-Business Forum</strong> and promotes dialogue with the European Institute of Technology (EIT). </p> <p>EUA has also proposed to the European Research Area Board (ERAB) that the Responsible Partnering Guidelines should be taken forward as a best practice in the first steps to creating an “Open Innovation Charter” proposed as an ERA Milestone in the ERAB’s recommendations in its “Strategic View of the European Research Area: Preparing Europe for a New Renaissance<img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" />.</p>

CREATE TABLE #Text (c1 varchar(100))
INSERT INTO #Text VALUES ('ASDF')
INSERT INTO #Text VALUES ('BCDE')
INSERT INTO #Text VALUES ('CDE')
DECLARE #SearchText nvarchar(512),
#ReplaceText nvarchar(512),
#SearchReplacement nvarchar(512)
SET #SearchText = '%DF%';
SET #SearchReplacement = 'DF'
SET #ReplaceText = '';
select * from #Text where c1 like #SearchText
update #Text set c1 = REPLACE(c1, #SearchReplacement, #ReplaceText)
REPLACE can't find the text because of the '% %' you have in #SearchText. You could also use SUBSTRING to remove the '%' in #SearchText

I am a dumbass.
Obviously the replace statement does not understand wildcard characters like the %.
I've updated the function like so which did work.
DECLARE #SearchText nvarchar(512),
#ReplaceText nvarchar(512)
SET #SearchText = '%<img width="19" height="16" alt="" style="margin: 0px; vertical-align: middle;border: 0px solid;" src="http://www.eua.be/uploads/RTEmagicC_d6849d8eef_44a388.gif.gif" />%';
SET #ReplaceText = '';
select * from sf_control_properties where val like #SearchText
SET #SearchText = REPLACE(#SearchText, '%', '')
SELECT 'Replacing ' + #SearchText + ' with ' + #ReplaceText
update sf_control_properties set val = REPLACE(val, #SearchText, #ReplaceText)

Related

Is it possible to have a table in the center in a GitHub gist Markdown?

Is it possible to have a table in the center in a GitHub gist Markdown? If so, how?
I've used the following syntax to create a table on a Markdown file:
Somehow the table is always flushed to the left!!!
|Column1|Column1|Column1|
|:----|:----:|----:|
|Column1|Column1|Column1|
But the table is flushed left, see https://gist.github.com/alvations/5095d3bcc0eec357c78f1c21a49e334f
Is it possible to have the table at the center of the page when viewing?
I've tried the suggestion from Is it possible to center tables in a markdown file? to use:
Somehow the table is always flushed to the left!!!
<center>
|Column1|Column1|Column1|
|:----|:----:|----:|
|Column1|Column1|Column1|
</center>
And the table disappears when viewing, see https://gist.github.com/alvations/cd3495e7107b7701cf1cf1da2a839534
I've also tried How do I center an image in the README.md on GitHub?:
Still on the left!!!
<p align="center">
|Column1|Column1|Column1|
|:----|:----:|----:|
|Column1|Column1|Column1|
</p>
But it's still on the left, see https://gist.github.com/alvations/23c18681df7a6bbf175d0e8c2cfccba3
Images for all three versions above:
In short, it's not possible. GitHub does not allow you to define your own styling.
First, note that there is no mention of the ability to apply any styling to any block level types in the GitHub Flavored Markdown spec (see the tables section). As your examples show, you are aware that you can center text within table cells, but that only applies to the cells and has no effect on the parent table (which is how HTML and CSS work and is not specific to Markdown or GitHub).
There are a few ways to define custom styles for HTML (which Markdown generates), but GitHub does not permit them.
One such way is to define CSS rules. However, right in the spec, GitHub explicitly states that they do not allow <style> tags.
Another way is to include raw HTML right in the Markdown document (with inline styles). However, for security reasons, GitHub is very selective about what they allow. In the Markup project they define the filters they apply to all markup languages they support (including, but not limited to Markdown). In pertinent part, the docs explain (emphasis added):
The HTML is sanitized, aggressively removing things that could harm you and your kin—such as script tags, inline-styles, and class or id attributes. See the sanitization filter for the full whitelist.
Given the above, it is simply not possible to define your own styling for documents hosted on GitHub. That said, some expect to be able to define styling within the Markdown syntax itself. However, the original Markdown rules explain (emphasis added):
Markdown’s syntax is intended for one purpose: to be used as a format for writing for the web.
Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown’s formatting syntax only addresses issues that can be conveyed in plain text.
For any markup that is not covered by Markdown’s syntax, you simply use HTML itself.
As it is not a "publishing format," providing a way to style your document is out-of-scope for Markdown. Which leaves us with the ways which GitHub explicitly disallows. Therefore it is not possible to center a table (or apply any other custom styling) on GitHub.
As an aside, while GitHub uses the CommonMark spec (with extensions) rather than the original Markdown Rules, I make reference to the original rules as the section I quote from discusses the philosophy behind various design decisions made when creating Markdown. Markdown's (and CommonMark's) behaviors are directly related to that philosophy. While the CommonMark spec does not get into the design decisions (expect when it differs from Markdown), it does make reference to some of the points discussed in the very paragraph I quoted above. And nowhere does it contradict that philosophy. Therefore, I consider it relevant to the expectations we should have about what is and what is not part of CommonMark, and by extension, GitHub Flavored Markdown.
For completness, let's examine each of the examples provided by the OP.
The first example is simply a table with the middle column aligned "center". If we "view source" (or use the browser's "inspect" tool), we see the following HTML was generated:
<table>
<thead>
<tr>
<th align="left">Column1</th>
<th align="center">Column1</th>
<th align="right">Column1</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Column1</td>
<td align="center">Column1</td>
<td align="right">Column1</td>
</tr>
</tbody>
</table>
Note that align="center" is only defined on the middle cell of each row. As such styling is only inherited by children elements, not parent elements, this does not get applied to the the table as a whole.
As an aside, the align attribute is not even mentioned in the HTML5 spec (that I could find); however, in the HTML 4.01 spec, you can define an align attribute on a table element or any of its children which is then inherited by the children of that element only.
Of course as established above, Markdown does not provide a mechanism to define alignment on anything except the cells. But even if you could define align on the table element, the spec explains that "[t]his attribute specifies the alignment of data and the justification of text in a cell."
Therefore, if would still have no effect on how the table is positioned in its parent element.
The second example is a table wrapped in a <center> element. A look at the source HTML reveals that the <center> tag was stripped out.
In fact, a look at GitHub's whitelisted elements reveals that center elements are not allowed and stripped out.
The third example attempts to wrap the table in a paragraph with align="center" defined on the paragraph. However, note the (interpreted) HTML:
<p align="center"></p>
<table>
<thead>
<tr>
<th align="left">Column1</th>
<th align="center">Column1</th>
<th align="right">Column1</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Column1</td>
<td align="center">Column1</td>
<td align="right">Column1</td>
</tr>
</tbody>
</table>
<p></p>
According to the HTML5 spec:
A p element's end tag may be omitted if the p element is immediately followed by an... table... element.
Therefore, the paragraph does not actually wrap the table, but is implicitly closed by the table's opening tag.
But that got me curious. What if you used a div instead of a paragraph. But that makes no difference. As we've established earlier, the align attribute only effects cell text. You need to assign a style to change the position of a table on the page and Github explicitly disallows defining your own styles.
As you can see in the following image, GitHub automatically renders tables so that they're already taking up the full width. Because of this, you cannot center the text that GitHub's Markdown renderer generates (aka the table is really, really fat and technically already centered).
So totally possible !
 
<div align="center">
COLUMN 1 | </br>COLUMN 2 | </br></br>COLUMN 3
:--- | :---: | ---:
</br></br>left | center | </br></br>right
</div>
: Spacer
</br> : Skip line
:--- : Left
:---: : Center
---: : Right
It is possible to center a table. Essentially, on GitHub the table is already width 100%. You just need to give the tbody enough content for it take up 100% width too.
The trick: fill it with spaces.
<table>
<tbody>
<tr>
<td align="center">Key Features<br>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
</td>
<td align="center">Examples<br>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
</td>
<td align="center">Supported Methods<br>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
<span> </span>
</td>
</tr>
</tbody>
</table>
Result:
Narrow browser window:
Using mathjax:
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML-full"></script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts:["STIX","TeX"], linebreaks: { automatic:true }, EqnChunk:(MathJax.Hub.Browser.isMobile ? 10 : 50) }, tex2jax: { inlineMath: [ ["$", "$"], ["\\\\(","\\\\)"] ], displayMath: [ ["$$","$$"], ["\\[", "\\]"] ], processEscapes: true, ignoreClass: "tex2jax_ignore|dno" }, TeX: { noUndefined: { attributes: { mathcolor: "red", mathbackground: "#FFEEEE", mathsize: "90%" } }, Macros: { href: "{}" } }, messageStyle: "none" }); </script>
$$
\begin{array}{|c|c|c|}
\hline
\textbf{Column1} & \textbf{Column1} & \textbf{Column1} \\
\hline
\text{Column1} & \text{Column1} & \text{Column1} \\
\hline
\end{array}
$$
Just add align="center" into tag table
<table align="center"></table>

remove a tag from html input with sed

I have a html table from which I want to remove rows with a certain class.
However: When I try sed 's/<tr class="expandable">.*<\/tr>//g it just does nothing (say: does not remove the tag)
An example input could be:
<tr><td>Some col</td></tr>
<tr class="expandable">
<td colspan="6">
<div class="expandable-content">
<p>Holds ACCA Practising Certificate: This indicates a member holding a practising certificate issued by ACCA. This means that the member is authorised to provide a range of general accountancy services to individuals and businesses, including business and tax advice and planning, preparation of personal and business tax returns, set up of book-keeping and business systems, providing book-keeping services, payroll work, assistance with management accounting help with raising finance, budgeting and cash-flow advice, business start-up advice and expert witness.</p>
</div>
</td>
</tr>
I am not a sed pro and appreciate any help you can give me!
Assuming your html is valid XML, you can use a tool like xmlstarlet:
xmlstarlet ed -d '//tr[#class="expandable"]' <<ENDHTML
<html><body><table>
<tr><td>Some col</td></tr>
<tr class="expandable">
<td colspan="6">
<div class="expandable-content">
<p>Holds ACCA Practising Certificate: This indicates a member holding a practising certificate issued by ACCA. This means that the member is authorised to provide a range of general accountancy services to individuals and businesses, including business and tax advice and planning, preparation of personal and business tax returns, set up of book-keeping and business systems, providing book-keeping services, payroll work, assistance with management accounting help with raising finance, budgeting and cash-flow advice, business start-up advice and expert witness.</p>
</div>
</td>
</tr>
</table></body></html>
ENDHTML
<?xml version="1.0"?>
<html>
<body>
<table>
<tr>
<td>Some col</td>
</tr>
</table>
</body>
</html>

Outlook 2007, 2010 and 2013 not respecting valign in <td>

I’ve set up a bare bones test here: https://www.emailonacid.com/app/acidtest/display/summary/eypNVE82ae543QsSdfiYJlcLNqtcmvKz1ybIvJRlCPj2n/shared
The simple goal is to have the main text align to the top of its TD, and the CTA text align to the bottom of its TD. As you can see, this is happening in every client except the Outlooks noted above (ignore mobile for this question).
Note that we do not know if the CTA will be more than one line, so it's not possible to determine its height.
I’ll post the code snippet below.
Thanks!
Don
<table width=“640” border=“0” cellpadding=“0” cellspacing=“0”>
<tr>
<td valign=“top”>http://imgs.elainemedia.de/w4gu/f8451d426cd5373fde24a98fcf496945.jpg</td>
<td valign=“top” bgcolor=”#000000”><table width=“100%” border=“0” cellspacing=“0” cellpadding=“0”>
<tr>
<td rowspan=“2” valign=“top”>http://imgs.elaine-asp.de/w4gu/1fce9767d9699082bfea5b0c475aece5.gif</td>
<td valign=“top”>Buy a Pro’s Bike
Ridden by the world’s finest, now available to you. With our Original Pro Bikes it’s easier than ever to own a unique piece of cycling history.</td>
</tr>
<tr>
<td valign=“bottom” style=“color:#ffffff;”>CTA GOES HERE</td>
</tr>
</table></td>
</tr>
</table>
Valign does not work because your inner table height does not scale up to the parent td height.
The problem you have, that there is no sure way to control the height of your inner table to fit outer table (besides fixed height on td's in both tables). I'm assuming you are trying to set height of the inner table by using invisible spacer gif image, but from your snippet I can't deduce if you have set height of the img tag.
Example:
<img src="http://imgs.elaine-asp.de/w4gu/1fce9767d9699082bfea5b0c475aece5.gif"
height="260" width="1" style="display: block; border: none;" alt="" />
Note: if the example above doesn't work, try changing spacer gif original image size from 1x1 to 10x10 pixels. Below is a quote from this article explaining spacer gifs in Outlook:
The fix is surprisingly easy and doesn't require any changes to the message markup. Instead just change the spacer GIF so that it is 10 x 10 pixels instead of 1 x 1. I think Outlook is maybe looking out for images that are 1 x 1 and treating them differently, maybe because they are often used as web beacons. (...) Of course you can still set the HEIGHT and WIDTH of the spacer GIFs to a size smaller than 10 x 10, so it's still possible to have them set to 1 x 1 and they'll still work as before.
Another solution is to remove inner table completely, and rebuild outer one as follows:
<table align="center" border="0" bgcolor="#000000" cellspacing="0" cellpadding="0"
width="640" style="width: 640px; background-color: #000000;">
<tr>
<td valign="top" rowspan="2">
<img src="http://imgs.elainemedia.de/w4gu/f8451d426cd5373fde24a98fcf496945.jpg"
width="460" height="280" style="display: block; border: none;" alt="">
</td>
<td valign="top" style="color: #ffffff;">
Buy a Pro’s Bike<br>
Ridden by the world’s finest, now available to you.
With our Original Pro Bikes it’s easier than ever to own
a unique piece of cycling history.
</td>
</tr>
<tr>
<td align="center" style="color: #ffffff;">
<!-- note you can go any align/valign combination here -->
CTA GOES HERE
</td>
</tr>
</table>
See how the two compare. I have added borders to illustrate how the td's and tables stacks against each other.
https://jsfiddle.net/jtquaja1/2/
Spacer images are a nice and simple solution, but can cause issues due to things like Outlook ignoring html image re-sizing, Outlooks different rendering of image size based on DPI as well as issues with image blocking or image-to-text ratio (importance is up for argument currently)
The most comprehensive cross email client alternative, although time consuming and complex, is to create a row above and below each and using height (with mso-line-height-rule for small rows in Outlook) to make each table the same size and the content centered.
sample: <tr><td height="10" style="font-size:10px; mso-line-height-rule:exactly; line-height:10px;"> </td></tr><tr><td>content goes here</td></tr> <tr><td height="10" style="font-size:10px; mso-line-height-rule:exactly; line-height:10px;"> </td></tr>
This can be accomplished using padding as well on the TD, instead of new rows. Some consider this to not be a comprehensive solution due to some mail clients may not render the padding correctly. I personally use the padding method as it is more efficient and more controllable for responsive design and have not found any issues in any email clients or browser.
sample: <tr><td style="padding-top:10px; padding-bottom:10px;">content goes here</td></tr>
Whatever you choose, my best advice is to test, test, test and test some more.

MODX: MIGX Extremely slow load times

I'm currently implementing MODX into a current site. (click here)
As you can probably tell, loading the site takes an absurd amount of time for something mostly textual. It loaded very quickly before I was using this CMS, so I'm assuming that it's just taking a very long time to request information from my database.
Here's how I have it set up: Each item under the category is included like this:
[[!getImageList?
&tvname=`lunchSoups`
&tpl=`menuItem`
]]
So, seeing as I have both Dinner + Lunch menus as well as all of these items, I end up with 14 requests. Is this what's slowing my page down, or is it just the amount of information? How can I reduce the load time?
Edit: I've taken out the ! in getImageList, so now it caches. The initial load is still extremely slow, though.
Edit: TPL Chunk:
I thought maybe the conditional type statements might be slowing down the website, but they seem to be the same speed without them.
[[+item:notempty=`
<h2>
<span>[[+item]] / <span>[[+price]]</span>
</h2>
`]]
<h3>
<span>[[+description]]</span>
</h3>
[[+addItem:notempty=`
</br>
<h2 style="font-style:italic; font-size: 13px; padding-bottom: 0px; padding-top: 0px; text-align: center; line-height: 1.2;">
[[+addItem]]
</h2>
</br>
`]]

Outlook and gmail emails are completely different

I did a template for our email marketing campaing. But on gmail, msn (browser based) are good but on outlook is bad. How can i solve the problem ?
A piece of my code:
<td valign="top" width="194" class="rightColumnContent">
<!-- // Begin Module: Top Image with Content \\ -->
<table border="0" cellpadding="10" cellspacing="0" width="194px" height="194px" style="background-color:#fafafa; margin-top:20px;">
<tr mc:repeatable>
<td valign="top">
<img src="http://cdn.popsbuy.com/emailing/y/images/arama.png" style="max-width:69px;float:left;margin-right:15px;" mc:label="image" mc:edit="tiwc200_image01" /><h4 class="h4" style="float: left;">ARAMA</h4>
<div mc:edit="tiwc200_content01" style="text-align:center; margin-top:10px;clear:both;"><br />
Aradığın ürüne, siteye, markaya doğrudan Popsbuy hesabınla erişebilirsin.
</div>
</td>
</tr>
</table>
<!-- // End Module: Top Image with Content \\ -->
</td>
You need to re-declare your font stack in every table cell.
Also, avoid margin, instead use padding in <td> tags.
Float is also not widely supported. If you want to float, you should be using align="left" instead, but for your example, it is better to keep it in tables.
Your code should look something like this:
<table width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="60">
<img src="http://cdn.popsbuy.com/emailing/y/images/arama.png" mc:label="image" mc:edit="tiwc200_image01" />
</td>
<td width="140" style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #000000; font-weight:bold; padding-left:15px; font">
ARAMA
</td>
</tr>
<tr>
<td width="100%" colspan="2" style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; color: #000000;">
<div mc:edit="tiwc200_content01" style="text-align:center; margin-top:10px;clear:both;"><br />
Aradığın ürüne, siteye, markaya doğrudan Popsbuy hesabınla erişebilirsin.
</div>
</td>
</tr>
</table>
I set the table width 200, you could change it to percentage based if you prefer.
Getting HTML emails to look great across all clients is something that pretty much everyone who has tried to do email marketing runs into. There is no simple answer to your question, but I would start by following some of this advice and testing your email templates with a tool like litmus.
Float simply will not work in Outlook 2007+. Versions of Outlook for Windows from 2007+ use Office as the rendering engine, and thus won't render standard HTML properly.
Align will often work, but the safest course of action is to create a two-column table with the image on the left and the text on the right. The image column should have an explicitly set width. (Don't try to make the table more than one row. In email HTML, it's better to nest a series of simple tables than to create one complex one.)
Make sure that you use the appopriate old-style pre-HTML 4 tag attributes in your table tags. In particular, to get your layout, make sure that the table cells have "valign='middle'".
If you're sending through one of the major email service providers, such as Mailchimp or Campaign Monitor (and you should be, to protect the integrity of your list), it will inline all your style code for you -- so you don't actually need to redeclare the styles for every table cell, you can simply use an embedded stylesheet.