Aligning text with the top of a ''textarea" element

Discussion in 'HTML & Website Design' started by Tintumol, Feb 27, 2011.

  1. #1
    Hello,

    I am trying to align some text with a 'textarea' element. I want the top of the textarea element aligned with the text rather than the text being aligned with the bottom of the 'textarea' element. I couldn't figure out how to do this with CSS. Can anyone help me out with that? thanks.

    I tried to use a margin to position the text area further from the top of the page, but that shifted everything downward?

     
    Tintumol, Feb 27, 2011 IP
  2. viruthagiri

    viruthagiri Active Member

    Messages:
    232
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    95
    #2
    I couldn't understand your question. I hope this is what you want

     
    viruthagiri, Feb 27, 2011 IP
  3. Designs Wonder

    Designs Wonder Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think, you want something like this...

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>

    <style type="text/css">
    .relative{height:auto; width:780px;}
    .absolute{float:right; margin-top:-23px;}
    </style>
    </head>

    <body>
    Use the listings below to help you set your price<br />
    <div class="relative">
    <input type="text"/> <input type="radio"/> New
    <input type="radio"/> Used Describe the condition: (any highlighting, missing cd, etc.)
    <div class="absolute">
    <textarea rows="4" cols="25">dfgdf</textarea>
    </div>
    </div>
    </body>
    </html>
     
    Designs Wonder, Feb 28, 2011 IP