Déplacer le BlockSearch dans Prestashop

Statut
N'est pas ouverte pour d'autres réponses.

Xavier Mustin

Administrator
Staff member
#1
How to change the width of the top search box in PrestaShop

The Module must be changed into the Theme structure and not in the default CSS file

To change the length of the top search field you need to make some CSS modifications.
In PrestaShop 1.5 we'll use as an example the default theme that comes prepackaged with the installation. The search block of that theme consists only of a search field/box and a button, and it's displayed almost in the top center of the page. Whether you want to increase or decrease the length of the search field you need to modify the file blocksearch.css that's part of the blocksearchmodule. If, for example, your PrestaShop is installed directly in the public_html folder on yourPrestaShop hosting account, meaning your site's accessible at yourdomain.com, then the path to the file will be public_html/modules/blocksearch/blocksearch.css. To change the width of the search field find the following code:
Code:
#search_block_top #search_query_top {
    padding:0 5px;
    height:23px;
    width:300px;/* 310 */
    border:1px solid #666;
    border-right: 0 !important;
    color:#666;
    background:url(img/bg_search_input.png) repeat-x 0 0 #fff;
    float: left;
}
Edit the line width:300px; and replace 300 with whatever number you want, depending on whether you want the field to be narrower or wider. You can edit the file from the Files section of the Pixie control panel, or you can download it with an FTP client (e.g. FileZilla), edit it with a text editor (e.g. Notepad) and upload it back in the same folder overwriting the old file. After that clear your browser cache and refresh the frontend of your site.
 
Statut
N'est pas ouverte pour d'autres réponses.
Haut