How do i create whitespace?

Discussion in 'JavaScript' started by lost, Oct 21, 2005.

  1. #1
    I need to put some spacing between 2 fields in a table format, how do i do that??
     
    lost, Oct 21, 2005 IP
  2. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #2
    Do you want horizontal space or vertical space?

    Vertical is easy. Just use
    <br>
    Code (markup):
    Horizonal could be accomplished by putting your form in a table, & using a table column of a set width in between the two form elements (each of which would be in their own column.)

    Hope that helps.

    If you could give us the page you are working on, it would be easier to understand exactly what you want. :)

    Adam
     
    adamjthompson, Oct 21, 2005 IP
  3. Skeleton

    Skeleton Peon

    Messages:
    116
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Do you want to do this with JavaScript ?
     
    Skeleton, Oct 21, 2005 IP
  4. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #4
    add another column (cell) between them or adjust the table's cellspacing attribute.
     
    exam, Oct 21, 2005 IP
  5. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #5
    for example

    <table cellspacing="40">

    gives you 40 pixels of spacing between table fields
    if background white = then white space
    else define table
    <table cellspacing="40" bgcolor="white">

    if columns/fields are in colors
     
    hans, Oct 21, 2005 IP
  6. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks everyone.
    I would like to do this in both javascript and html. I need the spacing to horizantal.

    This is what i have:
      <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
      <TR>
      <BR>
      <TD><FONT SIZE=2>Item 1 Barcode <INPUT TYPE=text VALUE=""</FONT></TD></TR> 
     
    Code (markup):
    I need to put some spacing between the word "Item" and the word "Barcode".
    Ther
     
    lost, Oct 21, 2005 IP
  7. mdvaldosta

    mdvaldosta Peon

    Messages:
    4,079
    Likes Received:
    362
    Best Answers:
    0
    Trophy Points:
    0
    #7
    how bout a small spacer gif
     
    mdvaldosta, Oct 21, 2005 IP
  8. adamjthompson

    adamjthompson Well-Known Member

    Messages:
    1,242
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    125
    #8
    Or insert a no break space:
    &nbsp;
    Code (markup):
     
    adamjthompson, Oct 21, 2005 IP
  9. lost

    lost Peon

    Messages:
    144
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thats exactly what i needed.

    Thank you!!
     
    lost, Oct 21, 2005 IP