Peda Posted May 15, 2015 Share Posted May 15, 2015 I am using PrestaShop 1.6.0.14 and I would like to move the subcategory image from the middle to the right. in category.css file I added background-position code .content_scene_cat .content_scene_cat_bg { padding: 18px 10px 10px 12px; background-color: #464646 !important; background-position: right !important; } @media (max-width: 1199px) { In Preferences -> Images, I changed dimensions to 217x217 and and also into other values and regenerate thumbnails but nothing changed. with regards Link to comment Share on other sites More sharing options...
jgamio Posted May 17, 2015 Share Posted May 17, 2015 Hi, The background-position is not work from the css because the image is set on div with a style rule you need find the div on the tpl and add the position on the style 1 Link to comment Share on other sites More sharing options...
Peda Posted May 18, 2015 Author Share Posted May 18, 2015 I think you are talking about catergory.tpl Do I have to change/add something in this code? Do you know what I have to change or add? <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> </div> Link to comment Share on other sites More sharing options...
jgamio Posted May 18, 2015 Share Posted May 18, 2015 Look these line <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> you need insert position inside the style Because the html use a style these override the css then you need change code there Link to comment Share on other sites More sharing options...
Peda Posted May 20, 2015 Author Share Posted May 20, 2015 Changing this code affecting both category main images and subcategory main images. I need only aligning subcategory images to the right side. I already don't know, which code I've to change/add in this line. Link to comment Share on other sites More sharing options...
fadedsuede Posted September 5, 2015 Share Posted September 5, 2015 Did anyone get this issue resolved? There is no intelligent reason why Prestashop would not allow the use of simple HTML edits to align images to the right. We shouldn't have to manipulate tpl or css code to change this. There have been dozens of complaints about this very issue and nobody has been able to resolve it for the Prestashop version 1.6.0.8 or later. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now