Need help getting two column format to work in CSS

I'm trying to get two columns to work in the middle of my HTML document.  The dropdown menu should be in the first column, with "copy for second column" in the second column.

Can some help?

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:
<?php
echo "<hr>";
//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:<br>";
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 "copy for second column<p>";
echo "</div>";
echo "</div>";

Open in new window

kennmurrahAsked:
Who is Participating?
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.

khan_webguruCommented:
Just copy the following code and replace your old one it will work fine

 
CSS:
#div-1 {
 position:relative; 
 width:420px;
}
#div-1a {
 position:relative;
 top:0;
 float:left;
 width:130px;
    text-align:left;
}
#div-1b {
 position:relative;
 top:0;
 float:left;
 width:200px;
}



HTML:
<?php
echo "<hr>";
//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>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>copy for second column</p>";
echo "</div>";
echo "</div>";

Open in new window


See live demo of your problem

http://jsfiddle.net/TeWsw/80/
0

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
khan_webguruCommented:
Please let me know if this help you otherwise send screen short of you desire result. and we will solve your issue thanks
0
kennmurrahAuthor Commented:
That's EXACTLY what I needed .. .thanks so much for the prompt response.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

kennmurrahAuthor Commented:
oops ... I guess I looked too fast ... using this code, which is a modification of what you gave me, resulted in the screenshot attached .... have also given my new colde
//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

ScreenShot.bmp
0
khan_webguruCommented:
so, What should be the actual output???
0
khan_webguruCommented:
Please copy and replace your code that is given below

 
//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>";
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 "<div id=\"div-1\">";
echo "<div id=\"div-1a\">";
echo "PAPER 2:";
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>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>&nbsp;</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 "<div id=\"div-1\">";
echo "<div id=\"div-1a\">";
echo "PAPER 3:";
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>";
echo "</div>";
echo "<div id=\"div-1b\">";
echo "<p>&nbsp;</p>";
echo "</div>";
echo "</div>";
}
echo "<hr>";

Open in new window

0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.