1. ThoKay
  2. Pre-Sales Question
  3. Thursday, 19 September 2019
  4.  Subscribe via email
Hello Ciaran,

is it possible in template Novah to have only the menu sticky (div header_nav), without div header_main?

Thanks, Tom
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Tom

Could you please detail what you visually wish to achieve visually by removing the header_main div?

Ciaran
  1. more than a month ago
  2. Pre-Sales Question
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Ciaran,

I would like to have only the menu-bar to remain 'sticky' - the upper part of the header (logo and tel./email) should disappear when scrolling down.

Thanks, Tom

(Edit: the same as you realised it in template Everly)
  1. more than a month ago
  2. Pre-Sales Question
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Tom

In your templates scripts.php (../templates/j51_novah/inc/scripts.php) replace the following (line 76)...

if($this->params->get('sticky_sw'))  {
// Sticky Div
$document->addScript('templates/'.$this->template.'/js/jquery.sticky.min.js', false, true);
$document->addScriptDeclaration('
jQuery(window).load(function(){
jQuery("#container_header").sticky({
topSpacing: 0
});
});
');
}


With....

if($this->params->get('sticky_sw'))  {
// Sticky Div
$document->addScript('templates/'.$this->template.'/js/jquery.sticky.min.js', false, true);
$document->addScriptDeclaration('
jQuery(window).load(function(){
jQuery(".header_nav").sticky({
topSpacing: -35
});
});
');
}


Also, add the following to the Custom CSS field of your templates settings.

.header_nav {
left: 0;
right: 0;
}


Ciaran
  1. more than a month ago
  2. Pre-Sales Question
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you, Ciaran,

I'll give it a try... :)

Tom
  1. more than a month ago
  2. Pre-Sales Question
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciaran,

(continuing here, although it is an 'after-sales question' in between...):

when I follow your instructions above a small issue happens: the menu-bar bar reduces its width.

Thank you for an advice...

Tom
  1. more than a month ago
  2. Pre-Sales Question
  3. # 5
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Tom

Would you have a URL to an example of this issue?

Ciaran
  1. more than a month ago
  2. Pre-Sales Question
  3. # 6
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you

To amend try adding the following to the Custom CSS field of your templates parameters (Extensions -> Templates -> [YourTemplateStyle] -> Custom CSS)....

@media only screen and (min-width: 1178px) {
.header_nav {
width: 1178px;
}}


Ciaran
  1. more than a month ago
  2. Pre-Sales Question
  3. # 7
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you, Ciaran.

I tried something similar with setting the width of hornav, but failed with an unwanted side-effect: when scrolling down the menu-bar jumps to the left margin.

The same happens with your proposal.

I provided a temporary super user account for you (see separate email) if you want to have access.

Thanks, Tom
  1. more than a month ago
  2. Pre-Sales Question
  3. # 8
Accepted Answer Pending Moderation
0
Votes
Undo
Thank you Tom

I have amended your custom CSS to the following and should now be giving you the desired result...

@media only screen and (min-width: 1178px) {
.header_nav {
width: 1178px;
margin: auto;
}}


Ciaran
  1. more than a month ago
  2. Pre-Sales Question
  3. # 9
Accepted Answer Pending Moderation
0
Votes
Undo
Hello Ciaran,

that works well!

Thank you very much,
Tom
  1. more than a month ago
  2. Pre-Sales Question
  3. # 10
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!