jwbc46 Posted August 17, 2015 Share Posted August 17, 2015 (edited) I recently updated to 1.6.x and ran into the problem with the category titles and description being on top my category images. I understand that is a new feature, but it didn't fit with my existing images so I had to figure out how to move them back above the image. The link below is the old discussion related to the topic with no resolution besides removing category images all together or redoing all images. https://www.prestashop.com/forums/topic/310422-bug-catergory-text-overlays-category-picture/ Here's what worked for me (default theme). I'm an amateur so it's entirely possible that there is a better way to do this and I'd be glad to hear criticism. Category.tpl <!-- Category image --> <div class="content_scene_cat_bg" > {if $category->description} <div class="cat_desc"> <span class="category-name"> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} <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'}) center no-repeat; min-height:{$categorySize.height}px;"{/if}> </div> </div> {/if} </div> {/if} </div> {/if} To work correctly on mobile or lower res screens I had to add two lines to category.css Category.css .content_scene_cat .content_scene_cat_bg { background-size: contain !important; padding: 1px 10px 10px 14px; background-color: #464646 !important; } @media (max-width: 1199px) { .content_scene_cat .content_scene_cat_bg { min-height: 250px !important; padding: 10px 10px 10px 15px; } } Edited August 17, 2015 by jwbc46 (see edit history) Link to comment Share on other sites More sharing options...
shacker Posted August 23, 2015 Share Posted August 23, 2015 (edited) you can do with css only edit the global.css in themes/default-bootstrap/css/ add this lines at the end .cat_desc{ position: relative; float: left; clear: both; margin-top: 128px; width: 100%; } #center_column h1 { font-size: 1.5em; text-transform: capitalize; width: 100%; clear: both; } the margin-top need to be changed if your category images are bigger Edited August 23, 2015 by shacker (see edit history) Link to comment Share on other sites More sharing options...
jwbc46 Posted August 23, 2015 Author Share Posted August 23, 2015 Awesome thank you! I'll try that out 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