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!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.
Cookies make it easier for us to provide you with our services. With the usage of our services you permit us to use cookies.
Ok