Jump to content

[SOLVED] how to display fixed horizontal top menu ?


Recommended Posts

everything depends on theme that you use

if you want to modify default theme - it's necessary to change almost everything in the top part of the template.

 

Yes Vekia it's the default theme on PS 1.5.4.1 . Please can you show me how to do it ?

Link to comment
Share on other sites

you can do it in many ways, one of them you can find above, posted by sooroos.

but of course you will have to customize it.

 

you can also check this one: fixed header in prestashop

this is the pattern, you can use it and customize appearance of the top section, you will get the same effect.

 

by appearance i mean css modification and remove all unnecessary modules

Link to comment
Share on other sites

okay,

 

so what you've got now?

is there any chance to check your website? if so - please share the url.

it's hard to help without an access to the website

 

i feel i'm so close look what i get vekia just miss a litlle bit at the right of the page to get my menu take the whole width

 

look here

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

vekia i'am in the localhost that's why i can't post a link here

in my header.tpl i have the following code

<!-- Header -->
  <div id="header" class="grid_9 alpha omega">
   <a id="header_logo" href="{$base_dir}" title="{$shop_name|escape:'htmlall':'UTF-8'}">
 <img class="logo" src="{$logo_url}" alt="{$shop_name|escape:'htmlall':'UTF-8'}" {if $logo_image_width}width="{$logo_image_width}"{/if} {if $logo_image_height}height="{$logo_image_height}" {/if} />
   </a>
   <div id="header_right" class="grid_9 omega">
 {$HOOK_TOP}
   </div>
  </div>
 <div id="page" class="container_9 clearfix">

 

and in my css i have that

.sf-contener {
clear: both;
}
.sf-right {
 margin-right: 14px;
 float: right;
 width: 7px;
}
.sf-menu, .sf-menu * {
margin:   0;
padding:  0;
list-style:  none;
}
.sf-menu {
margin: 0px 0;
padding:12px;
width:100%;/* 980 */
background: #000000;
}
.sf-menu ul {
position:  absolute;
top:   -999em;
width:   10em; /* left offset of submenus need to match (see below) */
}
.sf-menu ul li {
width:   100%;
}

Link to comment
Share on other sites

and module .tpl file ? can you paste contents of it?

 

topmenu.tpl

 

{if $MENU != ''}
<!-- Menu -->
<div class="sf-contener clearfix">
 <ul class="sf-menu clearfix">
  {$MENU}
  {if $MENU_SEARCH}
   <li class="sf-search noBack" style="float:right">
 <form id="searchbox" action="{$link->getPageLink('search')}" method="get">
  <p>
   <input type="hidden" name="controller" value="search" />
   <input type="hidden" value="position" name="orderby"/>
   <input type="hidden" value="desc" name="orderway"/>
   <input type="text" name="search_query" placeholder="Rechercher..." value="{if isset($smarty.get.search_query)}{$smarty.get.search_query|escape:'htmlall':'UTF-8'}{/if}" />  
  </p>
 </form>
   </li>
  {/if}
 </ul>
</div>
<div class="sf-right"> </div>
<!--/ Menu -->
{/if}

Link to comment
Share on other sites

add these styles for the .sf-contener:

width:100%;/* 980 */
background: #000000;

 

im not sure at all if this will work, it's hard to say without any possibility to test the code.

 

Thank You Vekia i resolved the problem

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...
×
×
  • Create New...