Jump to content

[SOLVED] Center logo in New Theme 1.6


Recommended Posts

Hello, 
 
Im looking the best way to center the logo in the new responsive theme. Could you help me?..
 
The idea is to center the logo between the search bar and the cart, with only CSS if possible to avoid damaging the mobile styles.
 

Thanks!!

 

Jose V.

Link to comment
Share on other sites

with css styles is not possible, but it's easy to achieve.

 

open header.tpl file (located in your theme dir) and remove this code:

<div id="header_logo">
									<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>
								</div>

then go to /themes/default-bootstrap/modules/blocksearch/blocksearch-top.tpl and paste code that you removed at the end of the file

 

 

effect:
LHU6WIl.png

  • Like 5
Link to comment
Share on other sites

with css styles is not possible, but it's easy to achieve.

 

open header.tpl file (located in your theme dir) and remove this code:

<div id="header_logo">
									<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>
								</div>

then go to /themes/default-bootstrap/modules/blocksearch/blocksearch-top.tpl and paste code that you removed at the end of the file

 

 

effect:

LHU6WIl.png

 

Great, That's what I was planning to do.. I was trying to find another options but I think it is not possible with only CSS.

Thanks for your help!!

  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...

im confused.

i asked about:
 

 

 

you mean that you want to remove search bar at all?

and you replied

 

 

Yes, i want only the logo center and the shopping cart on right...  :) 
Thank you! 

 

 

so you want to remove search bar, or not?

Link to comment
Share on other sites

now everything is clear,

thank you :)

 

copy 

<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
										<img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
									</a>

and paste it to the

<div id="search_block_top">
</div>

in search block module .tpl file

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Hi, 

 

Ok, i understand...

 

I maked same changes but it doesn't work.  Can you help me please ? 

 

** Center Logo without Search Bar **

______________________________________

1)

open header.tpl file (located in your theme dir) and remove this code:

<div id="header_logo">
                                    <a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>
                                </div>

then go to /themes/default-bootstrap/modules/blocksearch/blocksearch-top.tpl and paste code that you removed at the end of the file

______________________________________

 

2)

copy 

<a href="{$base_dir}" title="{$shop_name|escape:'html':'UTF-8'}">
                                        <img class="logo img-responsive" src="{$logo_url}" alt="{$shop_name|escape:'html':'UTF-8'}"{if $logo_image_width} width="{$logo_image_width}"{/if}{if $logo_image_height} height="{$logo_image_height}"{/if}/>
                                    </a>

and paste it to the

<div id="search_block_top">
</div>

in search block module .tpl file

______________________________________

 

I don"t understand the second part, where must i copy this second code ? 

 

Thank a lot for precision

Edited by dA3m0n (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hey! I'v just found this post and it's been great to me ^^ All these days fighting against header (or top) blocks and at least found a solution to center logo and another to hook search bar block and social block in new places. Yay, thanks a lot!

 

But I have a little issue with this Logo solution, is is responsive (at leat to me) since a determinated screen size, when I look on mobile screen sizes the logo goes big again and its outside of screen from the right.

 

Do you know what's happening? If needed url is lamallorquina.onesixstudio.com and I attach screenshot.

post-790822-0-96402000-1408018371_thumb.png

Edited by NicePack (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Thank you for your reply. But when I use it, I see that this change isn´t good for me (web design).

 

I was moved cart to displayNav, but it is in left position. But I need to fix it from right. Anyone can help me?? What and where change it?

 

cart_3.jpg

how did u move the cart there?

Link to comment
Share on other sites

  • 4 weeks later...
  • 3 months later...
  • 2 weeks later...

Hi Vekia,

 

I did what you suggested and it did not work. I replaced the header.tpl and the blocksearch-top.tpl with the original files, to at least go back to the logo beeing on the left, but now the Logo has disapperead all together. I also uploaded the Logo again via the Theme configurations. What also happed was, the live Position Edit shows a error now. Please let me know if you have an idea what could have happened and how I can get the Logo back!?

Prestashop Version 1.6.0.11

 

Cheers

Orange

Link to comment
Share on other sites

×
×
  • Create New...