1
我加了一個filterToolbar搜索框來我網,改變它的高度風格就像this問題 。的jqGrid filterToolbar搜索輸入居中對齊
我想定位這個輸入在中心, (我試過text-align:center
,但它沒有工作)。 如何將輸入框居中在列標題內?
UPDATE: 這是我的colModel代碼:
{width:10,name:'Code1',index:'Code1', jsonmap:'Code1',searchoptions:{dataInit: function(elem){$(elem).css('font','15px'); $(elem).height(18);}}},
{width:40,name:'DescriptionHe1',index:'DescriptionHe1', jsonmap:'DescriptionHe1',searchoptions:{dataInit: function(elem){$(elem).css('font','15px');$(elem).height(18);}}, hidden:(language == "he")?false:true},
{width:40,name:'DescriptionEn1',index:'DescriptionEn1', jsonmap:'DescriptionEn1',searchoptions:{dataInit: function(elem){$(elem).css('font','15px');$(elem).height(18);}}, hidden:(language == "en")?false:true},
{width:10,name:'Code2',index:'Code2', jsonmap:'Code2',searchoptions:{dataInit: function(elem){$(elem).css('font','15px'); $(elem).height(18);}}},
{width:40,name:'DescriptionHe2',index:'DescriptionHe2', jsonmap:'DescriptionHe2',searchoptions:{dataInit: function(elem){$(elem).css('font','15px');$(elem).height(18);}}, hidden:(language == "he")?false:true},
{width:40,name:'DescriptionEn2',index:'DescriptionEn2', jsonmap:'DescriptionEn2',searchoptions:{dataInit: function(elem){$(elem).css('font','15px');$(elem).height(18);}}, hidden:(language == "en")?false:true}
感謝的在進展。
感謝的了詳細的解答!我嘗試將代碼更改爲你所做的,但它不能很好地工作,我仍然無法看到中心的輸入。我希望搜索輸入與高度一致,並且100%寬度,兩側有一點空間。這可能嗎? (我用我的代碼更新了這個問題)。謝謝! – user590586