Javascript appendChild()
<p>Hey I am trying to appendChild() two consecutive div's but what I am expecting as result is for them to be side by side, but they are one on top of the other like so:</p>

<pre><code>1st div
2nd div
</code></pre>

<p>instead of 1st div 2nd div</p>

<pre><code>var addBudContainer = document.createElement("div");
addBudContainer.id = "addBudContainer";

var addBudBtn = document.createElement("div");
addBudBtn.className = "addBud";

var addBudBtnName = document.createElement("a");
addBudBtnName.className = "btn-addBud";
addBudBtnName.setAttribute("href","#");

addBudBtn.appendChild(addBudBtnName);

var addBudTxt = document.createElement("input");
addBudTxt.id="addBudTxt";
addBudTxt.type="text";
addBudTxt.defaultValue="Enter buddy name";
//txt box effects   
addBudTxt.onfocus = function(){if(replyTxt.value==replyTxt.defaultValue) replyTxt.value='';};
addBudTxt.onblur= function(){if(replyTxt.value=='') replyTxt.value=replyTxt.defaultValue;};

addBudContainer.appendChild(addBudBtn);
addBudContainer.appendChild(addBudTxt);
</code></pre>
