forcing <form> to stay on a line

Discussion in 'HTML & Website Design' started by matthewrobertbell, Dec 25, 2006.

  1. #1
    if i have <h2>blah blah</h2><form>......... , how can i force them to stay on one line without resorting to tables? I presume there is some css trickery possible?

    Cheers
     
    matthewrobertbell, Dec 25, 2006 IP
  2. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Absolute positioning might be an option but not recommended. <h2> is a block-level element - it takes up the entire row
     
    Corey Bryant, Dec 25, 2006 IP
  3. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It's a menu bar within a div, h2 big menu items, then a search form. Is there any way of making it take up only one line?
     
    matthewrobertbell, Dec 25, 2006 IP
  4. Corey Bryant

    Corey Bryant Texan at Heart

    Messages:
    1,126
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could split the divide up (like a cell / table)
     
    Corey Bryant, Dec 25, 2006 IP
  5. matthewrobertbell

    matthewrobertbell Peon

    Messages:
    781
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thats what i thought, but i thought using tables for layout was frowned upon these days?
     
    matthewrobertbell, Dec 25, 2006 IP
  6. discoverclips

    discoverclips Peon

    Messages:
    491
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #6
    maybe you can try CSS: display:inline; ?
     
    discoverclips, Dec 25, 2006 IP
  7. abuzant

    abuzant Well-Known Member

    Messages:
    956
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    #7
    
    <form [b]style="margin: 0px;"[/b]>
    .....
    ...
    .
    </form>
    
    Code (markup):
     
    abuzant, Dec 25, 2006 IP