workin on a little site, an html versiojn of one i did for SEO reasons:
http://www.lowbackclinic.com/testimonials.php
Look at the testimonials in firefox etc. they look fine, but in IE7 they are stretched over to the left side of the page. Tried everything i could think of, still not working. heres the source:
<?php
function nls2p($str){
return str_replace('<p></p>', '', '<p>'
. preg_replace('#([
]\s*?[
]){2,}#', '</p>$0<p>', $str)
. '</p>');
}
if (!($fp=@fopen("testimonials.xml", "r"))){die ("Couldn't open XML.");}
$usercount=0;
$userdata=array();
$content=array();
$state='';
if (!($xml_parser = xml_parser_create())){
die("Couldn't create parser.");
}
function startElementHandler ($parser,$name,$attrib){
global $usercount;
global $userdata;
global $state;
$state=$name;
}
function endElementHandler ($parser,$name){
global $usercount;
global $userdata;
global $state;
$state='';
if($name=="HOVERCAP") {
$usercount++;
}
}
function characterDataHandler ($parser, $data) {
global $usercount;
global $userdata;
global $content;
global $state;
if (!$state) {return;}
if ($state=="NAME") { $userdata[$usercount]["name"] = $data;}
if ($state=="CONTENT") { $content[$usercount] .= nls2p($data);}
if ($state=="IMAGE") { $userdata[$usercount]["image"] = $data;}
if ($state=="AUDIO") { $userdata[$usercount]["audio"] = "audio/".$data;}
}
xml_set_element_handler($xml_parser,"startElementHandler","endElementHandler");
xml_set_character_data_handler( $xml_parser, "characterDataHandler");
while( $data = fread($fp, 4096)){
if(!xml_parse($xml_parser, $data, feof($fp))) {
break;
}
}
xml_parser_free($xml_parser);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Low Back Clinic - Testimonials</title>
<meta name="keywords" content="www.unikron.com, web, design, flash, video, streaming, production, new, media, html, php, asp, sql, interactive, internet">
<meta name="description" content="Spinal decompression therapy, Low Back Clinic, Toronto.">
<meta name="author" content="Unikron Inc - www.unikron.com">
<meta name="robots" content="all">
<meta name="copyright" content="Low Back Clinic - 2007">
<meta name="content-language" content="eng">
<meta name="revisit" content="5 days">
<link rel="icon" type="image/png" href="http://www.lowbackclinic.com/favicon.png">
<link rel="stylesheet" type="text/css" href="css/2col.css">
<script type="text/javascript" src="js/mootools.js"></script>
</head>
<body>
<div id="header"><img src="images/logoHeader.jpg" alt="Low Back Clinic"></div>
<div class="spacer"> </div>
<div id="nav">
<ul id="navlist">
<li><a href="home.html" id="home" name="home" title="Go to Home Page" style="text-decoration:none; color:#ffffff;">Home</a></li>
<li><a href="about.html" id="about" name="about" title="Go to About Us" style="text-decoration:none; color:#ffffff;">About Us</a></li>
<li><a href="abouttreatment.html" id="abouttreatment" name="abouttreatment" title="Go to About the Treatment" style="text-decoration:none; color:#ffffff;">About the Treatment</a></li>
<li class="selected">Testimonials</li>
<li><a href="faq.html" id="faq" name="faq" title="Go to the F.A.Q" style="text-decoration:none; color:#ffffff;">F.A.Q.s</a></li>
<li><a href="form/index.html" id="apply" name="apply" title="Go to Treatment Application" target="_blank" style="text-decoration:none; color:#ffffff;">Apply for Treatment</a></li>
<li><a href="contact.html" id="contact" name="contact" title="Go to Contact Us" style="text-decoration:none; color:#ffffff;">Contact Us</a></li>
</ul>
<script type="text/javascript">
var alt = 1;
var menuitems = document.getElementsByTagName("li");
for(x in menuitems){
var myFx = new Fx.Style(menuitems[x], 'opacity').start(0,1);
var menulinks = menuitems[x].getElementsByTagName("a");
menuitems[x].menulinks = menulinks[0];
menuitems[x].style.cursor='pointer';
if(menuitems[x].innerHTML != "Testimonials"){
menuitems[x].onmouseover=function(){
this.style.backgroundImage = "url(images/menu-items-over.gif)"
}
menuitems[x].onmouseout=function(){
this.style.backgroundImage = "url(images/menu-items.gif)"
}
menuitems[x].onclick = function(){
window.location.href = this.menulinks.href;
}
}
}
</script>
</div>
<div id="content">
<?php
for ($i=0;$i<$usercount; $i++) {
echo "<div style='padding:10px; background-image:url(images/bglight.gif); border:1px solid #cccccc;'>";
echo "<div style='float:right;'><img src='images/".$userdata[$i]['image']."' /></div>";
echo "<span class='subtitle bluetext'>".$userdata[$i]['name']."</span><br>";
if($content[$i] != ""){echo $content[$i];}
if($userdata[$i]['audio']!=""){echo "<a href='".$userdata[$i]['audio']."' style='color:#ffffff'>This user has submitted an audio testimonial, click here to listen</a>";}
echo "<div style='clear:both'></div>";
echo "</div><br>";
}
?>
</div>
<div class="spacer"> </div>
<div id="footer">Site designed by Unikron Inc.</div>
</body>
</html>