Medyman
06-30-2007, 02:35 AM
Hey guys...
I have the following PHP code within a larger page (also included below):
Troublesome PHP
<?
if($fail)
{
echo "<div id=error>NO SEARCH RESULTS</div>";
}
else{
if($_GET[s])
echo "<div id=error>SEARCH RESULTS</div>";
if(!sizeof($res))
echo "<div id=error>NO POSTS TO DISPLAY</div>";
foreach($res as $row){
?>
Entire Document
<?
$fail = false;
if(isset($_GET[s]))
include("search.php");
else
include("recent.php");
?>
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/swfobject.js"></script>
<link type="text/css" rel="stylesheet" href="css/Style.css" />
<link rel="shortcut icon" href="favicon.ico" />
<title>THEPAPERBAGWRITER // CHANGING THE WAY INFORMATION FLOWS</title>
</head>
<body bgcolor="#ffffff">
<div id="container">
<div id="mainframe" >
<form id="myform" action="POST">
<input type="text" class="textinput" /> <input class="submit" type="image" src="images/form.png" />
</form>
<div id="musicholder">
<div id="flashmusic">To view the header, please upgrade your Flash plugin.</div>
<script type="text/javascript">
var so = new SWFObject("musicPlayer.swf", "music", "340", "20", "8", "#CCCCCC");
so.addParam("quality", "high");
so.addParam("wmode", "opaque");
so.addParam("salign", "t");
so.addParam("scale", "noscale");
so.write("flashmusic");
</script>
</div>
<div id="musiccredit" style='float:right;'><a href="http://www.caribou.fm/site/">MUSIC BY CARIBOU</a></div>
<div id="menuline"> </div>
<div id="flashcontent">To view the header, please upgrade your Flash plugin.</div>
<script type="text/javascript">
var so = new SWFObject("header2.swf", "index", "700", "250", "8", "#ffffff");
so.addParam("quality", "high");
so.addParam("wmode", "opaque");
so.addParam("salign", "t");
so.addParam("scale", "noscale");
so.write("flashcontent");
</script>
<div id="leftframe">
<div id ="news">
<div id="framehead"><img src="images/news.jpg" alt="news" /></div>
<div id="newsart">
<span id="date">06.15.07</span>
<br />SUBMISSIONS FOR ISSUE ONE WILL BE CLOSING SOON, THIS IS YOUR LAST CHANCE TO SUBMIT YOUR POETRY, PROSE AND TEXT FOR CONSIDERATION IN OUR FIRST ISSUE.
<br />
<br /><span id="date">06.05.07</span>
<br />NEW PODCASTS! WE ARE PLEASED TO ANNOUNCE OUR FIRST EVER PODCAST, PAPER + PLASTIC IS NOW AVAILABLE THROUGH OUR SITE, APPLE.COM AND ON EAST VILLAGE RADIO.
<br />
<br /><span id="date">05.25.07</span>
<br />NEW SITE! ENJOY THE NEW SITE COURTESY OF DESIGNS BY VISHAL. IF YOU HAVE ANY QUESTIONS OR COMMENTS, PLEASE EMAIL WEB@THEPAPERBAGWRITER.COM
</div>
</div>
<br />
<div id="video">
<div id="framehead" style='background-image:URL("images/videos.jpg");'><a href="http://www.adbusters.org"><img src="images/kalle.gif" style='float:right;margin-top:2px;' alt="Kalle Head" /></a></div>
<div id="youtube"><embed src="http://www.youtube.com/v/-GhXKILWcG8" type="application/x-shockwave-flash" width="100%" height="210"></embed></div>
</div>
<br />
<div id="personals">
<div id="framehead"><img src="images/personals.jpg" alt="personals" /></div>
<span id="opening">LOOKING FOR A CARTOONIST</span>
<span id="desc">Looking for a cartoonist, somewhere between 4’8 and 8’9, preferably male or female (although I don’t discriminate) must be out going, fun loving romantic who shares my adoration and enthusiasm for Fellini and Mozart and candle lit dinners. Must have at least six fingers and some experience in the visual arts. <br /><br />*If you meet at least 32% of these requirements and are interested in joining our team, drop us a line at 516.474.3947 or email us at team@thepaperbagwriter.org</span>
</div>
</div>
<div id="rightframe">
<div id ="rp">
<div id="framehead" style='width:98%'><img src="images/recentposts.jpg" alt="Recent Posts" /></div>
<?
if($fail)
{
echo "<div id=error>NO SEARCH RESULTS</div>";
}
else{
if($_GET[s])
echo "<div id=error>SEARCH RESULTS</div>";
if(!sizeof($res))
echo "<div id=error>NO POSTS TO DISPLAY</div>";
foreach($res as $row){
?>
<div id="postborder">
<div id="post">
<div id="title">
<? echo "<a href=$blogurl/".$row[blogid]."/?p=".$row[pid].">".$row[post_title]."</a>"; ?>
</div>
<div id="content">
<? if($_GET[s]) echo parsecontent($row[post_content]); else echo $row[post_content]; ?><span id="more"><a href="<? echo "$blogurl/".$row[blogid]."/?p=".$row[pid]; ?>"> [...] MORE</a></span>
</div>
</div>
</div>
<?
}
}
?>
</div>
</div>
</div>
<div id="sideframe">
<a href="brownpaper.php"><img src="images/firstissue.jpg" alt="First Issue" /></a>
<div id="framehead"><img src="images/bptitle.jpg" alt="Brown Paper" /></div>
<br />
<a href="paperandplastic.php"><img src="images/pp.jpg" alt="Paper and Plastic" /></a>
<br />
<a href="donations.php"><img src="images/donate2.jpg" alt="Donate" /></a>
<br />
<a href="subscribe.php"><img src="images/subscribe2.jpg" alt="Subscribe" /></a>
<br />
<a href="shop.php"><img src="images/shop2.jpg" alt="Shop" /></a>
<br />
<a href="http://www.myspace.com/mybrownpaperbag"><img src="images/myspace2.jpg" alt="MySpace" /></a>
</div>
</div>
</body>
</html>
The "troublesome php" listed above seems to be setting of my page's alignment in FF. Screenshots of how it renders in FF and IE are here: http://www.dynamicdrive.com/forums/showthread.php?t=22110.
Does anyone know what could be causing this?
When I take out that bit of php, it aligns perfectly (but then, it produces errors within the php so taking it out is not an option).
I have the following PHP code within a larger page (also included below):
Troublesome PHP
<?
if($fail)
{
echo "<div id=error>NO SEARCH RESULTS</div>";
}
else{
if($_GET[s])
echo "<div id=error>SEARCH RESULTS</div>";
if(!sizeof($res))
echo "<div id=error>NO POSTS TO DISPLAY</div>";
foreach($res as $row){
?>
Entire Document
<?
$fail = false;
if(isset($_GET[s]))
include("search.php");
else
include("recent.php");
?>
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/swfobject.js"></script>
<link type="text/css" rel="stylesheet" href="css/Style.css" />
<link rel="shortcut icon" href="favicon.ico" />
<title>THEPAPERBAGWRITER // CHANGING THE WAY INFORMATION FLOWS</title>
</head>
<body bgcolor="#ffffff">
<div id="container">
<div id="mainframe" >
<form id="myform" action="POST">
<input type="text" class="textinput" /> <input class="submit" type="image" src="images/form.png" />
</form>
<div id="musicholder">
<div id="flashmusic">To view the header, please upgrade your Flash plugin.</div>
<script type="text/javascript">
var so = new SWFObject("musicPlayer.swf", "music", "340", "20", "8", "#CCCCCC");
so.addParam("quality", "high");
so.addParam("wmode", "opaque");
so.addParam("salign", "t");
so.addParam("scale", "noscale");
so.write("flashmusic");
</script>
</div>
<div id="musiccredit" style='float:right;'><a href="http://www.caribou.fm/site/">MUSIC BY CARIBOU</a></div>
<div id="menuline"> </div>
<div id="flashcontent">To view the header, please upgrade your Flash plugin.</div>
<script type="text/javascript">
var so = new SWFObject("header2.swf", "index", "700", "250", "8", "#ffffff");
so.addParam("quality", "high");
so.addParam("wmode", "opaque");
so.addParam("salign", "t");
so.addParam("scale", "noscale");
so.write("flashcontent");
</script>
<div id="leftframe">
<div id ="news">
<div id="framehead"><img src="images/news.jpg" alt="news" /></div>
<div id="newsart">
<span id="date">06.15.07</span>
<br />SUBMISSIONS FOR ISSUE ONE WILL BE CLOSING SOON, THIS IS YOUR LAST CHANCE TO SUBMIT YOUR POETRY, PROSE AND TEXT FOR CONSIDERATION IN OUR FIRST ISSUE.
<br />
<br /><span id="date">06.05.07</span>
<br />NEW PODCASTS! WE ARE PLEASED TO ANNOUNCE OUR FIRST EVER PODCAST, PAPER + PLASTIC IS NOW AVAILABLE THROUGH OUR SITE, APPLE.COM AND ON EAST VILLAGE RADIO.
<br />
<br /><span id="date">05.25.07</span>
<br />NEW SITE! ENJOY THE NEW SITE COURTESY OF DESIGNS BY VISHAL. IF YOU HAVE ANY QUESTIONS OR COMMENTS, PLEASE EMAIL WEB@THEPAPERBAGWRITER.COM
</div>
</div>
<br />
<div id="video">
<div id="framehead" style='background-image:URL("images/videos.jpg");'><a href="http://www.adbusters.org"><img src="images/kalle.gif" style='float:right;margin-top:2px;' alt="Kalle Head" /></a></div>
<div id="youtube"><embed src="http://www.youtube.com/v/-GhXKILWcG8" type="application/x-shockwave-flash" width="100%" height="210"></embed></div>
</div>
<br />
<div id="personals">
<div id="framehead"><img src="images/personals.jpg" alt="personals" /></div>
<span id="opening">LOOKING FOR A CARTOONIST</span>
<span id="desc">Looking for a cartoonist, somewhere between 4’8 and 8’9, preferably male or female (although I don’t discriminate) must be out going, fun loving romantic who shares my adoration and enthusiasm for Fellini and Mozart and candle lit dinners. Must have at least six fingers and some experience in the visual arts. <br /><br />*If you meet at least 32% of these requirements and are interested in joining our team, drop us a line at 516.474.3947 or email us at team@thepaperbagwriter.org</span>
</div>
</div>
<div id="rightframe">
<div id ="rp">
<div id="framehead" style='width:98%'><img src="images/recentposts.jpg" alt="Recent Posts" /></div>
<?
if($fail)
{
echo "<div id=error>NO SEARCH RESULTS</div>";
}
else{
if($_GET[s])
echo "<div id=error>SEARCH RESULTS</div>";
if(!sizeof($res))
echo "<div id=error>NO POSTS TO DISPLAY</div>";
foreach($res as $row){
?>
<div id="postborder">
<div id="post">
<div id="title">
<? echo "<a href=$blogurl/".$row[blogid]."/?p=".$row[pid].">".$row[post_title]."</a>"; ?>
</div>
<div id="content">
<? if($_GET[s]) echo parsecontent($row[post_content]); else echo $row[post_content]; ?><span id="more"><a href="<? echo "$blogurl/".$row[blogid]."/?p=".$row[pid]; ?>"> [...] MORE</a></span>
</div>
</div>
</div>
<?
}
}
?>
</div>
</div>
</div>
<div id="sideframe">
<a href="brownpaper.php"><img src="images/firstissue.jpg" alt="First Issue" /></a>
<div id="framehead"><img src="images/bptitle.jpg" alt="Brown Paper" /></div>
<br />
<a href="paperandplastic.php"><img src="images/pp.jpg" alt="Paper and Plastic" /></a>
<br />
<a href="donations.php"><img src="images/donate2.jpg" alt="Donate" /></a>
<br />
<a href="subscribe.php"><img src="images/subscribe2.jpg" alt="Subscribe" /></a>
<br />
<a href="shop.php"><img src="images/shop2.jpg" alt="Shop" /></a>
<br />
<a href="http://www.myspace.com/mybrownpaperbag"><img src="images/myspace2.jpg" alt="MySpace" /></a>
</div>
</div>
</body>
</html>
The "troublesome php" listed above seems to be setting of my page's alignment in FF. Screenshots of how it renders in FF and IE are here: http://www.dynamicdrive.com/forums/showthread.php?t=22110.
Does anyone know what could be causing this?
When I take out that bit of php, it aligns perfectly (but then, it produces errors within the php so taking it out is not an option).