Forum Moderators: open
What's got me miffed is the dang thing sometimes is very slow loading, and my page just waits for it to finish.
Here's the deal. Directly below my body tag, and my first div, I've got a JS insert that pulls in my babel. Right now it's disabled on one of my sites because it takes too long too load. Tomorrow it might be quick as greased lightning.
Here's how it looks:
<body class=b>
<div class=div>
<js babel>
</div>
...
I need a way to position this on the page and have everything flow *around* it while it lopes along, allowing the rest of the page to display. My first thought was to place it in a div and use z-index. But my assumptions about what z-index can do seem to be wrong (I've never used z-index)
Is there a way to accomodate this (sometimes)slug at the top of the page and still have page load, even if the babel never loads?
z-index only takes effect with absolutely positioned elements -- and it's the absolute positioning you want, not necesarily the overlay effects you can achieve with z-index.
So position the bablefish div absolutely, with the offset coordinates you need to position it properly when the whole page renders -- and then place the code for the bablefish div at the very end of your HTML.
In general, a page elements begin rendering in the order that they appear in the HTML document. So every thing else on the page, especially the text, should come in before the js for the babelfish starts to do it's thing.
[edited by: tedster at 11:37 pm (utc) on Mar. 20, 2004]
Or are you actually including the translated text? If so, is there a way to do that with Javascript alone, or are you using an IFRAME or some kind of screen scraper application to insert the translation?
Thanks.
You can almost guarantee that the translation is off, especially if it's more than a few words.
Ya... someone here is the house has looked at the Spanish translation, it's not too bad.
jomaxx - It's not Alta Vista. Rather than run afoul of the TOS and mention the name of the service, I'll just say that it appears to take my content and run it thru a translator, and then pop-up a new page with my layout.
Anyway, I got it positioned (almost where I want it) on the page and the code is the last thing to find in the page html. No more concern about losing someone because the page takes too long to load.