Jump to content

Top horizontal menu doesnt fit screen


yavanna

Recommended Posts

Any ideas, how to fit top horizontal menu items in one row? I have 9 categories and in my computer they are in one row, but I discovered that in smaller screens there are two rows and its not visually very nice.

 

e.g some code, that makes this menu fit screen or smth?

 

Thanks! 

Link to comment
Share on other sites

Thanks!

 

Somehow I can't find grid_9 value and also place where to change top horizontal menu width.

 

My header <div> from header.tpl file looks like this:

 
<!-- Header -->
<header id="header">
<a id="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>
{$HOOK_TOP}
</header>

 

instead of what I saw from thread here:

 

remove the header <div> from the <div id="page">

pzu1Sgn.png

then remove grid_9 value


after that it will be neessary to change also width of the top horizontal menu (CSS styles) just change the width:980px; to width:100%;

 

Link to comment
Share on other sites

take a look:

 

1366x768 - full width:

VpB2pBx.png

 

 

 

but when you change resolution it isnt:

 

n8CUmoV.png

 

 

responsiveness is based on media queries, in this case you will have to edit also these styles

@media only screen and (max-width: 1320px)
#header, #content, #footer {
max-width: 1000px;
}

+

@media only screen and (max-width: 1320px)
#header, #content, #footer {
max-width: 1000px;
}

+

@media only screen and (max-width: 1020px)
#header, #content, #footer {
max-width: 800px;
}
Link to comment
Share on other sites

for example, instead of max-width: 800px;  use width:100%!important;

 

btw. you have to remove this:

@media only screen and (max-width: 1020px)

#header, #content, #footer {
max-width: 800px;
}

 

not this:

@media only screen and (max-width: 1020px)

Link to comment
Share on other sites

now i don't know what you want to achieve. You said that you want 100% width, after changing code your header has got 100% width no matter what resultion you will use.

 

two rows in menu - everything depends on your theme

there is not enough space for menu items, so you see 2 rows

Link to comment
Share on other sites

Well, what I am hoping to achieve, is someting like prestashop backoffice looks like - no matter how small screen or window, top horizontal menu always stays in one row.

 

back office isn't responsive - so while you changing width / screen - it always dispaly the same layout.

with responsive theme, your page changing layout while you use different screens. 

your theme hasn't got responsive menu, it's a bit more complicated that simple full width header

it mean that you should change menu because it isn't responsive... effect that you want to achieve isn't as easy to create as it seems.

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Did you resolve this?

I'm trying the same thing,to keep the top navigation on one row.  As soon as the screen becomes smaller than 1190px, it cuts into two rows so my website looks bad on all tablets.  I would like to either add a (+) at the end where no more space is available to display categories or just display the mobile version of the navigation.  I'm on PS 1.6 

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...