Positioning textarea label above with or without table - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Position

Description

Positioning textarea label above with or without table

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#ContactUsForm {<!--   w ww .j a  v  a  2s  .co  m-->
   width:1401px;
   height:401px;
   top:228px;
   left:43px;
   border:3px solid Chartreuse;
}

#ContactUsForm p {
   text-decoration:underline;
   font-weight:bold;
   top:-16px;
   left:51px;
   font-size:31px;
}

.contact {
   background:white;
   border:3px solid yellow;
}

#message {
   width:501px;
   height:151px;
   top:100px;
   left:31px;
   resize:none;
   display:block;
}

#email {
   width:501px;
   height:71px;
   display:block;
   resize:none;
   top:301px;
   left:31px;
}

label {
   vertical-align:top;
}
</style> 
 </head> 
 <body> 
  <div id="ContactUsForm"> 
   <p>Lorem ipsu</p> 
   <form> 
    <table> 
     <tbody> 
      <tr> 
       <td> <label for="message">Lorem ipsum d</label> <textarea id="message" class="contact" name="message"></textarea> <label for="email">Lorem ipsum</label> <textarea id="email" class="contact" name="email"></textarea> </td> 
      </tr> 
     </tbody> 
    </table> 
   </form> 
  </div>  
 </body>
</html>

Related Tutorials