Hey Forum Members:
I have revolving text on two pages in my website. The revolving text is formed from JavaScript. The text revolves fine, but text jumps up and down. I test my pages using IE, Firefox, and Opera browsers.
Two pages to look at:
[url]www.globallablog.com/ex_1.html
[url]www.globallablog.com/ex_2.html
First, in [B]Firefox[B]Opera
Second, open “ex_1” in [B]IE
Third, open “ex_2”.
The frames of the revolving text area in “ex_2” use different font sizes (coded in css: 12px and 19px). The difference in text size causes the paragraph below the revolving text area to reposition itself (jumps up and down). In [B]IE[B]Firefox[B]Opera
…I’ve attempted to even out the revolving text window by trying
different font-sizes and using line-height (css), but to no avail.
…I’ve attempted using positioning (css), but the browsers act
different in how they interpret it.
The left-side menu is a div with float:left (css). The paragraph above revolving text is a div with float:right (css) (.fs below). Revolving text area is a nestled div (.nd below). Paragraph below revolving text is of the div controlling the paragraph above revolving text area.
[quote]
[u]CSS for relevant parts of page
.fs
{
margin:0% 2% 0% 0%; padding:5% 0% 0% 0%;
width:73.5%;
float:right;
overflow:hidden;
}
.nd
{margin:0% 0% 0% -7%; color:#ffcc99}
[u]CSS FOR REVOLVING TEXT
blockquote
{display:none}
blockquote pre
{font-family:”Times New Roman”; font-size:19px; font-style:italic}
blockquote cite
{font-family:”Courier New”, monospace; font-size:12px; font-style:normal}
#quote0 {display:block}
[quote]
[U]Javascript for Revolving Text
//<![CDATA[
window.onload = setup;
function setup()
{ if (! document.getElementsByTagName) return false;
var elms = document.getElementsByTagName(“blockquote”);
if (! elms.length) return false;
rotate(elms, 0); }
function rotate(elms, iElm)
{ var currElm = elms[iElm];
var timer = setInterval( swap,3000);
function swap()
{ currElm.style.display = “none”;
currElm = elms[++iElm % elms.length];
currElm.style.display = “block”; }
}
//]]>