I have had to modify the HTML on my project to work round this, but
the HTML I was generating was something like
<img src='leftendcap.gif'><a href='bar'><img src='rightendcap'>
with an appropriate backgound image on the <a> tags to make a button-
like link. The extra spaces before the <a> and after the </a> tags
would of course show up, leaving gaps in my 'button'.
I have had to switch to a table with cells for each of the endcaps and
the anchor tag, which is also more robust in dealing with another
issue in which sometimes the anchor tags are removed altogether, just
leaving the contents behind. (the a tag still exists though in the
hover 'original text' bubble...)
On Feb 23, 9:17 pm, Josh. wrote:
> Hi guys,
>
> I can't seem to find an example where this causes a problem.
> I definitely see Google Translate playing fast and loose with
> whitespace, but from what I can find none of them cause rendering
> problems.
>
> If you guys can point me to a specific example that I can test out I
> may be able to help you figure out what's going wrong.
>
> Best,
> Josh
>
> On Feb 17, 12:48 pm, rgirwin wrote:
>
> > I just wanted to add another voice to this issue. I am having a
> > similar problem where the extra spaces inserted on the translated page
> > are causing disruption to the presentation. Note the extra space
> > following the first <img> tag. The images in this snippet are for
> > 'button' end caps and the extra space degrades the appearance.
>
> > [start -- original source fragment]
> > <div class="ebBoardName">
> > <img class='left' src='../images/blank.gif' alt=""><a
> > href='javascript:void(ebBookmarkMe("http://test2.eboarddev.com"));'
> > style="vertical-align: top"><img alt="bookmark this page" src='../
> > images/addFav.gif'> </a><a href="http://test2.eboarddev.com">
> > test2.eboarddev.com</a><img class='right' src='../images/blank.gif'
> > alt="">
> > </div>
> > [end -- original source fragment]
>
> > [start -- translated fragment]
> > <div class="ebBoardName"><img class='left' src='../images/blank.gif'
> > alt=""> <a href='javascript:void(ebBookmarkMe("http://
> > test2.eboarddev.com"));'
> > style="vertical-align: top"><img alt="bookmark esta página" src='../
> > images/addFav.gif'></a> <span onmouseover="_tipon(this)"
> > onmouseout="_tipoff()"><span class="google-src-text" style="direction:
> > ltr; text-align: left"><a href="http://74.125.91.100/translate_c?
> > hl=en&langpair=en%7Ces&u=http://test2.eboarddev.com/
> > &client=tmpg&usg=ALkJrhg7P8e69q5oTv4DFXUztvFbceRQyQ">test2.eboardde
> > v.com</
> > a></span> <a href="http://74.125.91.100/translate_c?
> > hl=en&langpair=en%7Ces&u=http://test2.eboarddev.com/
> > &client=tmpg&usg=ALkJrhg7P8e69q5oTv4DFXUztvFbceRQyQ">test2.eboardde
> > v.com</
> > a></span> <img class='right' src='../images/blank.gif' alt=""></div>
> > [end -- translated fragment]
>
> > The web site/application that this sample comes from is in flux, or I
> > would include the link here. Many of the changes we are making are to
> > keep the page stable following a translation.
>
> > On Jan 30, 1:06 pm, dvddo wrote:
>
> > > The Google translation engine add an extraspacearound the anchor tag
> > > when it parse the page which causes the display to look wrong.
>
> > > For example the html code
>
> > > <td class="but"><a href="/default.asp" target="_self" onmouseout="off
> > > (1);" onmouseover="on(1);"><img src="/img/00/navbuts/but1_off.gif"
> > > alt="" width="99" height="21" border="0" name="b1"></a><img src="/img/
> > > 00/layout/butd.gif" alt="" width="2" height="21" border="0" >
>
> > > is coverted to
>
> > > <td class="but"> <a href="http://74.125.19.104/translate_c?
> > > hl=en&langpair=EN%7CES&u=http://web.cityofwoodland.org/
> > > default.asp&usg=ALkJrhhkbfiTWQd_KdOg2CEcczdJIPNURw" target="_self"
> > > onmouseout="off(1);" onmouseover="on(1);"><img src="/img/00/navbuts/
> > > but1_off.gif" alt="" width="99" height="21" border="0" name="b1"></a>
> > > <img src="/img/00/layout/butd.gif" alt="" width="2" height="21"
> > > border="0" >
>
> > >http://www.cityofwoodland.org/
>
> > > The above link shows an example of the result of this addition.
>
> > > Thanks for taking a look.
>
> > > Minh