How to place logo only in nav menu of mobile device

Everything to do with Joomla! 4.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.
Post Reply
forvikramsharma
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Apr 25, 2024 12:43 pm

How to place logo only in nav menu of mobile device

Post by forvikramsharma » Thu Apr 25, 2024 1:41 pm

Hi,

I have a page: https://times11.com/. I am using cassiopeia theme.

On mobile devices, I want to place the logo image in the middle of red ribbon menu bar. Please help how do i do it.
The desktop menu remains same.

Thank You.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30972
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: How to place logo only in nav menu of mobile device

Post by Per Yngve Berg » Thu Apr 25, 2024 2:06 pm

Mod. Note: Relocated topic to the templates forum

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9777
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: How to place logo only in nav menu of mobile device

Post by AMurray » Thu Apr 25, 2024 9:49 pm

I think you'd use CSS @media queries (not the expert, so only pointing you to relevant resources that might help):

https://www.w3schools.com/css/css_rwd_mediaqueries.asp and more examples: https://www.w3schools.com/css/css3_mediaqueries_ex.asp

See the example headed "typical device breakpoints". Use the ones concerning mobile devices.

Essentially the media query will apply when the device used meets the criteria e.g. a screen smaller than 992px will show an image/logo. You write the CSS (for Cassiopeia, in user.css), and the browser takes care of it).

Others I'm sure will add to my advice here.
Regards - A Murray
General Support Moderator

User avatar
Pavel-ww
Joomla! Ace
Joomla! Ace
Posts: 1657
Joined: Tue Jun 30, 2020 12:17 pm

Re: How to place logo only in nav menu of mobile device

Post by Pavel-ww » Fri Apr 26, 2024 7:08 am

forvikramsharma wrote:
Thu Apr 25, 2024 1:41 pm
On mobile devices, I want to place the logo image in the middle of red ribbon menu bar. Please help how do i do it.
The desktop menu remains same.
Hi.

This is not possible to do with your current marking, since you use the menu item as a logo.
You should use the logo as a separate element outside the menu. Then this can be done through CSS.


Post Reply

Return to “Templates for Joomla! 4.x”