div object alignment

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • khaleelmys
    New Member
    • Feb 2008
    • 1

    div object alignment

    Hi,

    I'm creating the table dynamically. below the table I want to display the previous and next link. below is the part of the code

    [CODE=javascript] var prevDiv=documen t.createElement ('div');
    var nextDiv=documen t.createElement ('div');

    prevDiv.id="pre v";
    prevDiv.innerHT ML='<a href="#" onClick="prev() " id="prevPage">P rev</a>';
    nextDiv.id="nex t";
    nextDiv.innerHT ML='<a href="#" onClick="next() " id="nextPage">N ext</a>';

    var pagingRow=table .insertRow(tabl e.rows.length);
    var pagingCell=pagi ngRow.insertCel l(0);
    pagingCell.appe ndChild(prevDiv );
    pagingCell.appe ndChild(nextDiv );
    [/CODE]
    The code is working. But the prev and next link get displayed one below the other. I want it to be displayed in single line, one after the other.

    Please let me know how to do it.

    Thanks in advance for any help
    Last edited by acoder; Feb 22 '08, 08:29 AM. Reason: Added code tags
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    i think you may use a span instead of a div ...

    kind regards

    Comment

    Working...