{"id":2120,"date":"2020-02-11T19:03:41","date_gmt":"2020-02-12T00:03:41","guid":{"rendered":"https:\/\/xlinesoft.com\/blog\/?p=2120"},"modified":"2020-03-14T11:12:06","modified_gmt":"2020-03-14T16:12:06","slug":"making-search-panel-horizontal","status":"publish","type":"post","link":"https:\/\/xlinesoft.com\/blog\/2020\/02\/11\/making-search-panel-horizontal\/","title":{"rendered":"Making search panel horizontal"},"content":{"rendered":"<p>The search panel is displayed vertically on the left side of the List page by default. Sometimes you need to make it more prominent and place it above the grid, just like on the screenshot below.<\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser-300x199.png\" alt=\"\" width=\"300\" height=\"199\" class=\"alignnone size-medium wp-image-2197\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser-300x199.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser-768x509.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser-1024x678.png 1024w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_browser.png 1099w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<!--more--><\/p>\n<p>Doing so is fairly simple.<\/p>\n<h4>1. Changes in Page Designer<\/h4>\n<p>Proceed to the List page in Page Designer. Add a new line to the section above the section with Add\/Delete buttons. Drag the search panel brick to that cell. <\/p>\n<p><a href=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design-300x188.png\" alt=\"\" width=\"300\" height=\"188\" class=\"alignnone size-medium wp-image-2195\" srcset=\"https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design-300x188.png 300w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design-768x481.png 768w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design-1024x641.png 1024w, https:\/\/xlinesoft.com\/blog\/wp-content\/uploads\/2020\/02\/scr_search_panel_horizontal_design.png 1442w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h4>2. Custom CSS<\/h4>\n<p>Now we need to make sure that search controls appear horizontally and also that search panel takes the whole horizontal space. To do so we can use the following CSS code under Eidtor->Custom CSS. By default, all DIVs are displayed vertically, one under another so we needed to use <strong>float: left<\/strong> to make them align horizontally. More info about <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/float\">float property<\/a>.<\/p>\n<pre name=\"code\" class=\"css:nocontrols\">\r\n.form-group.srchPanelRow.rnr-basic-search-field, div.srchPanelRow.form-group {\r\nfloat: left !important;\r\ndisplay: table;\r\nmargin: 5px;\r\n}\r\n\r\n<\/pre>\n<p>It is worth mentioning that the following two tutorials helped us build this CSS.<br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=_DmMYRCUtU8\">Introduction to Custom CSS<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=yFnD38oslIc\">Choosing the correct CSS selector<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The search panel is displayed vertically on the left side of the List page by default. Sometimes you need to make it more prominent and place it above the grid, just like on the screenshot below.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,1,4,8],"tags":[],"_links":{"self":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2120"}],"collection":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=2120"}],"version-history":[{"count":7,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2120\/revisions"}],"predecessor-version":[{"id":2198,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/posts\/2120\/revisions\/2198"}],"wp:attachment":[{"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=2120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=2120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xlinesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=2120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}