EasyUI Forum
May 17, 2024, 05:41:20 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: placement of combobox [SOLVED]  (Read 7342 times)
svsnead
Newbie
*
Posts: 15


View Profile Email
« on: February 25, 2016, 06:48:59 AM »

I have been trying to place a combobox that I using to a location. I can change the width and height but I can not change the left right bottom or top. How do you place a combobox. I will have more than one combobox and need to place each on so overriding the css is not going to work. Someone's help would be really appreciated. I tried using a class to set the top and left position but it does not work.

Here is the code:
Code:

              <input class="easyui-combobox test"  name="status" value="name"
       data-options="valueField:'id',textField:'text',url:'data/combobox_data.json'">

.test {
  position: absolute;
  top: 139px;
  left:400px;
}




I guess it is the 'textbox combo' class that needs to have the style left and top, but I'm not sure how set it. I have googled that heck of it and I cannot find and example or info on how to place a combobox as far as top and left position. Any help would be appreciated.





Changing the combo css works but that would change all combo boxes.


Code:
.combo {
  position: absolute;
  top: 139px;
  left:400px;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  border-width: 1px;
  border-style: solid;
  overflow: hidden;
  vertical-align: middle;
}


I tried addClass to the combobox span so that is would add the top and left positions but it did not work either. I tried
'span:first' but that did not work at all.

Code:
  $('#cc').combobox({
   onLoadSuccess: function(){
$("span").addClass("c1");
}
  });

.c1 {
  position: absolute;
  top: 139px;
  left:400px;
}



« Last Edit: February 25, 2016, 03:30:48 PM by svsnead » Logged
svsnead
Newbie
*
Posts: 15


View Profile Email
« Reply #1 on: February 25, 2016, 11:36:41 AM »

I tried to use the position method to see if it would offset the element but it does not move at all.

Code:
                     <div>
                     <input id="status" class="easyui-combobox"  name="status" value="name"
       data-options="valueField:'id',textField:'text',url:'data/combobox_data.json'">
</div>


$("#status").position({
  of: $('#status').parent(),
  my: 'left top',
  at: 'left top',
  offset: '160 160'
});


Whew! I cannot figure it out for sure. I cannot believe that there is not a way to set the top or left style. When I use the width this work for width just not for top or left.

I tried this:

Code:
                     <div>
                     <input class="easyui-combobox"  name="status" value="status"
       data-options="valueField:'id',textField:'text',url:'data/combobox_data.json',top:'250px;'">
</div>
« Last Edit: February 25, 2016, 12:37:37 PM by svsnead » Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #2 on: February 25, 2016, 03:18:04 PM »

Please put the c1 class for the parent container of combobox component.
Code:
<div class="c1">
                      <input id="status" class="easyui-combobox"  name="status" value="name"
        data-options="valueField:'id',textField:'text',url:'data/combobox_data.json'">
</div>
Logged
svsnead
Newbie
*
Posts: 15


View Profile Email
« Reply #3 on: February 25, 2016, 03:30:05 PM »

Oh my I sure made that difficult... Thank you Thank you Thank you..... That was one think I did not try.
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!