Jump to content

Recommended Posts

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.

 

3DAkBO.jpg

 

 

 

with regards

post-101194-0-81243500-1431713881_thumb.jpg

Link to comment
Share on other sites

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

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

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

  • 3 months later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...