two columns (via DIV statements) not displaying as expected

I thought I had the solution but not quite ... the code below results in "the second column" being displayed in the first column, not in the second ... and "paper 2" and "paper 3" should be in the left most column ... what have done wrong?



 
//paper
$result3 = mysql_query("select * from items
where product_number = '$category' and joblet_number = 2 order by item_name
");
if ($row = mysql_fetch_array($result3)) { 
echo "<div id=\"div-1\">";
echo "<div id=\"div-1a\">";
echo "PAPER:";
echo "<select name=\"folding\" onchange=\"determineDiv(this);\">
<option>CHOOSE</option>";
do { 
$item_name = $row["item_name"];
	$item_number = $row["item_number"];
echo "<option value = \"$item_number\">$item_name</option>";
	
}
while($row = mysql_fetch_array($result3));
echo "<option>CUSTOM</option>";
echo "</select></p>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>copy for second column</p>";
echo "</div>";
echo "</div>";


}
//paper
$result3 = mysql_query("select * from items
where product_number = '$category' and joblet_number = 2 order by item_name
");
if ($row = mysql_fetch_array($result3)) { 
echo "PAPER 2:<br>";
echo "<select name=\"folding\">
<option>CHOOSE</option>";
do { 
$item_name = $row["item_name"];
	$item_number = $row["item_number"];
echo "<option value = \"$item_number\">$item_name</option>";
	
}
while($row = mysql_fetch_array($result3));
echo "<option>CUSTOM</option>";
echo "</select><p>";
}
//paper
$result3 = mysql_query("select * from items
where product_number = '$category' and joblet_number = 2 order by item_name
");
if ($row = mysql_fetch_array($result3)) { 
echo "PAPER 3:<br>";
echo "<select name=\"folding\">
<option>CHOOSE</option>";
do { 
$item_name = $row["item_name"];
	$item_number = $row["item_number"];
echo "<option value = \"$item_number\">$item_name</option>";
	
}
while($row = mysql_fetch_array($result3));
echo "<option>CUSTOM</option>";
echo "</select><p>";
}
echo "<hr>";

Open in new window

kennmurrahAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lukasz ChmielewskiCommented:
Can you post the script that creates db table structure ?
kennmurrahAuthor Commented:
Let me do a better job of isolating the problem.  The code below eliminates unnecessary code ... if I can get this to work, I can get the rest to work ... this ought to be much easier to troubleshoot, though I've looked at it a hundred times and I can't catch the mistake :-(

This code results in "copy for second column" being displayed beneath the "Paper 1" copy instead of to the right of it as I intended.

thanks.

CSS:
#div-1 {
 position:relative;
}
#div-1a {
 position:absolute;
 top:0;
 right:200;
 width:200px;
}
#div-1b {
 position:absolute;
 top:0;
 left:0;
 width:200px;
}

HTML:
/paper
$result3 = mysql_query("select * from items
where product_number = '$category' and joblet_number = 2 order by item_name
");
if ($row = mysql_fetch_array($result3)) { 
echo "<div id=\"div-1\">";
echo "<div id=\"div-1a\">";
echo "PAPER:";
echo "<select name=\"folding\" onchange=\"determineDiv(this);\">
<option>CHOOSE</option>";
do { 
$item_name = $row["item_name"];
	$item_number = $row["item_number"];
echo "<option value = \"$item_number\">$item_name</option>";
	
}
while($row = mysql_fetch_array($result3));
echo "<option>CUSTOM</option>";
echo "</select></p>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>copy for second column</p>";
echo "</div>";
echo "</div>";

Open in new window

kevp75Commented:
#div-1 {
 position:relative;
 clear:both;
}
#div-1a {
 float:left;
 width:200px;
}
#div-1b {
 float:left;
 width:200px;
}
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

kevp75Commented:
even better:

CSS:
#div-1 {
 position:relative;
 clear:both;
}
#div-1a, #div-1b {
 float:left;
 width:200px;
}
.clear {width:100%;position:relative;clear:both;}


HTML:
/paper
$result3 = mysql_query("select * from items
where product_number = '$category' and joblet_number = 2 order by item_name
");
if ($row = mysql_fetch_array($result3)) { 
echo "<div id=\"div-1\">";
echo "<div id=\"div-1a\">";
echo "PAPER:";
echo "<select name=\"folding\" onchange=\"determineDiv(this);\">
<option>CHOOSE</option>";
do { 
$item_name = $row["item_name"];
	$item_number = $row["item_number"];
echo "<option value = \"$item_number\">$item_name</option>";
	
}
while($row = mysql_fetch_array($result3));
echo "<option>CUSTOM</option>";
echo "</select></p>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>copy for second column</p>";
echo "</div>";
echo "</div>";
echo "<div class=\"clear\"></div>";

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kennmurrahAuthor Commented:
kevp75, perfect

 .... thank you so much.  
kevp75Commented:
:)   Anytime
Guy Hengel [angelIII / a3]Billing EngineerCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.