Content hide behind fixed menu on mobile view

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
pranabmistry
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Sun Dec 07, 2014 4:51 pm
Location: Dhaka, Bangladesh
Contact:

Content hide behind fixed menu on mobile view

Post by pranabmistry » Thu May 28, 2015 9:35 am

I have a major issue with my site on mobile view. I am using YT framework & SJ News ii. I made the header sticky using the code below;

Code: Select all

#yt_menuwrap { 
position: fixed;
}
#yt_spotlight1 {
padding-top: 120px;
}
It works great with desktop view but on mobile view the height of the yt_menuwrap increases to 240px so I need to assign 240px as padding top on yt_spotlight1. How can I do this?

Need help. My site url: sitestalk.com
With Regards
Pranab Mistry

JoomIa-Shark
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Fri Apr 17, 2015 5:40 pm
Contact:

Re: Content hide behind fixed menu on mobile view

Post by JoomIa-Shark » Thu May 28, 2015 6:06 pm

I think I am understanding what you are trying to do, but correct me if wrong.

I think you should make the containing div fixed instead, like this:

#yt_menuwrap {
position: fixed;
top: 0;
}

Then add the 240px padding to 'body'
Joomla Help and Resources: www.joomla-shark.com

User avatar
pranabmistry
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Sun Dec 07, 2014 4:51 pm
Location: Dhaka, Bangladesh
Contact:

Re: Content hide behind fixed menu on mobile view

Post by pranabmistry » Fri May 29, 2015 9:30 am

Thanks a lot for your quick response.

My site works good on big screen/desktop view, coz on desktop view, the height of the top bar is 120px, But if you open it on a smaller screen, then the logo goes to top & the height of the top bar increases to 240 px.

If you plz check my site on both type of screen then it will be clear.

Thank you once again.
With Regards
Pranab Mistry

JoomIa-Shark
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Fri Apr 17, 2015 5:40 pm
Contact:

Re: Content hide behind fixed menu on mobile view

Post by JoomIa-Shark » Fri May 29, 2015 5:53 pm

Yes, but you can set up CSS for specific device width using media queries.

For example:

@media (max-width: 767px) {
#yt_menuwrap {
position: fixed;
top: 0;
}
}

Therefore it will not affect your website on devices wider than 767 pixels.

I hope that helps.
Joomla Help and Resources: www.joomla-shark.com

User avatar
pranabmistry
Joomla! Explorer
Joomla! Explorer
Posts: 339
Joined: Sun Dec 07, 2014 4:51 pm
Location: Dhaka, Bangladesh
Contact:

Re: Content hide behind fixed menu on mobile view

Post by pranabmistry » Fri May 29, 2015 8:15 pm

Thanks Joomla Shark. In fact I was looking for this. It really helps.
With Regards
Pranab Mistry

JoomIa-Shark
Joomla! Explorer
Joomla! Explorer
Posts: 306
Joined: Fri Apr 17, 2015 5:40 pm
Contact:

Re: Content hide behind fixed menu on mobile view

Post by JoomIa-Shark » Mon Jun 01, 2015 10:15 pm

No problem. Glad to help.
Joomla Help and Resources: www.joomla-shark.com


Locked

Return to “Templates for Joomla! 3.x”