Jump to content
php.lv forumi

Google translate banner


Recommended Posts

Posted (edited)

Sveiki.

 

Aiz <body> taga man ir:

<div id="pops_txt"></div>

pops_txt css:

#pops_txt { position:absolute;background:white;display:none;width:200px;text-align:center;font-size: 12px;color:black;padding:3px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius: 5px;border:1px solid #d4d4d4;}

 

Lapas apakšpusē ir JavaScript`s, kas attēlo man tekstu uzbraucot ar peli:

function pops(txt)
{
var pop=document.getElementById('pops_txt');
pop.style.left=mouse_x+'px';
pop.style.top=mouse_y+'px';
pop.style.display='block';
pop.innerHTML=txt;
}

 

Bez translate:

cs9uw7m2p4cx5tdrf1x_thumb.png

 

Ar translate:

y8mwyjwg31zjps06x83a_thumb.png

 

Pēc google translate ielādes, man #pops_txt tiek pasists 40px uz leju, jo tā height ir 40px.

Kā varētu šamo apmānīt?

Edited by mach1ne^

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...