posted 18 years ago
I have a small conundrum.
here is my script:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>St Cloud Orthopedics Associates, LTD.</title>
<link href="ortho.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var pic_width=100;
var pic_height=100;
/* define image urls */
if (document.images)
{
pic1= new Image(pic_width,pic_height);
pic1.src="/images/O2C.gif";
pic2= new Image(pic_width,pic_height);
pic2.src="/images/S2C.gif";
}
/* define text for image captions */
var pics= new Array(2)
pics[0]=pic1.src;
pics[1]=pic2.src;
var numpics=2;
var thenum=0;
imgName="logo";
function change_it()
{
if (document.images)
{
document.write("<img src='"+pics[thenum]+"' border='0' width='"+pic_width+"' height='"+pic_height+"' name='logo'>\n");
setTimeout('change_it2()',5000);
}
}
function change_it2()
{
var x=0;
thenum+=1;
if (thenum>numpics-1)
thenum=0;
document[imgName].src=pics[thenum];
x+=1;
setTimeout('change_it2()',5000);
}
//-->
</script>
</head>
<body>
<div id="wrapper">
<div id="header">
<script type="text/javascript">
<!--
change_it();
//-->
</script>
<p><strong>St. Cloud Orthopedic Associates, LTD.</strong><br />
1555 Northway Drive • (320) 259-4100<br />
St. Cloud, MN 56303</p>
</div>
</div>
</body>
</html>
the question is how do I setup the changeit() so it will work with my css so i can float it to the left and the <p> to the center?