EasyUI Forum
December 05, 2025, 08:11:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Label position2  (Read 13953 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« on: January 17, 2016, 03:42:26 AM »

Hello all
I need to put the Label of TextArea on top instead of middle of the textarea.
You can see how it looks like (currently) here:
http://www.jeasyui.com/demo/main/index.php?plugin=Form&theme=default&dir=ltr&pitem=
and I need it on top (I'm talking about Label "Message:")
Can not post example image, folder is full.

Thank you.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2303


View Profile Email
« Reply #1 on: January 17, 2016, 04:07:21 AM »

Just set the 'vertical-align' style for the <td> element.
Code:
<td style="vertical-align: top;">Message:</td>
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 on: January 17, 2016, 10:46:54 AM »

Thank you so much but actually I don't use table but div:
<div class="fitem"><label>Note:</label><input class="easyui-textbox" data-options="multiline:true" style="width:75%;height:36px;"></div>

and here is css
.fitem label{
  display:inline-block;
  width:85px;
  padding:10px 30px;
}

how to put "Note:" label on top of the textbox instead of middle?
I try with
<div class="fitem"><label style="vertical-align: top;">Note:</label><input class="easyui-textbox" ... ></div>
but it does not work.

Thank you.
« Last Edit: January 17, 2016, 10:54:24 AM by Pierre » Logged
jarry
Administrator
Hero Member
*****
Posts: 2303


View Profile Email
« Reply #3 on: January 17, 2016, 06:39:26 PM »

Please try this code instead.
Code:
<style>
.fitem label{
  display:inline-block;
  width:85px;
  padding:0;
  vertical-align: top;
}
</style>
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #4 on: January 17, 2016, 11:39:28 PM »

Hello
it works but there is no "space" between controls and my form looks ugly.
Is there any other way - so the textbox label is placed on top and that
padding:10px 30px;
can be used?
Because all my Form controls (labels and other) using padding:10px 30px;
I can not post image because your folder is full.
Thanks.
« Last Edit: January 17, 2016, 11:42:59 PM by Pierre » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!