Tablet rotation distorts logo in header Topic is solved

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
mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Tablet rotation distorts logo in header

Post by mikewitherell » Thu Jun 01, 2023 2:28 am

I have recently migrated from 3 to 4. I like it. My template called Flex looks nice, but when I rotate to portrait mode on an iPad tablet, the header logo image gets distorted and it is stretched horizontally across to meet the hamburger menu. Same distortion on smartphone. I tested in Chrome and Safari. Same distortion of the brand logo graphic.
Last edited by toivo on Thu Jun 01, 2023 4:02 am, edited 1 time in total.
Reason: mod note: moved from 4.x General Questions

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Thu Jun 01, 2023 8:47 am

Hi. Explore this through the dev tools of your browser and make adjustments to CSS

mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Re: Tablet rotation distorts logo in header

Post by mikewitherell » Thu Jun 01, 2023 6:08 pm

Hmmmm. I wish I wasn’t such a newbie so that I could dev the css. But I’m a newb.

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Fri Jun 02, 2023 7:57 am

mikewitherell wrote:
Thu Jun 01, 2023 6:08 pm
Hmmmm. I wish I wasn’t such a newbie so that I could dev the css. But I’m a newb.
Hi. In this case, always provide a link to your site. Nobody has a magic ball here to see your problem ;)

mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Re: Tablet rotation distorts logo in header

Post by mikewitherell » Fri Jun 02, 2023 11:01 am

trainingonsite.com

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Fri Jun 02, 2023 12:22 pm

mikewitherell wrote:
Fri Jun 02, 2023 11:01 am
trainingonsite.com
Try this code

Code: Select all

@media (max-width: 991.98px) {
    #sp-logo .sp-default-logo,
    #sp-logo .sp-retina-logo {
        width: inherit;
    }
}

mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Re: Tablet rotation distorts logo in header

Post by mikewitherell » Sun Jun 04, 2023 3:39 pm

Thank you for the CSS code, Pavel.
Would you also give me a hint where to paste this code? I have never done that before.

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Sun Jun 04, 2023 5:10 pm

mikewitherell wrote:
Sun Jun 04, 2023 3:39 pm
Thank you for the CSS code, Pavel.
Would you also give me a hint where to paste this code? I have never done that before.
Hi. Add it to custom.css file. Your template is based on Helix 3. Read Helix 3 documentation about custom.css file

mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Re: Tablet rotation distorts logo in header

Post by mikewitherell » Sun Jun 04, 2023 5:40 pm

Thank you Pavel! That works fine. I pasted your css code into the 3rd box labeled Custom CSS. I am new to J4 and had not seen that tab before. Easier than J3. Why the highly-specific number 991.98px?

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Mon Jun 05, 2023 12:37 pm

mikewitherell wrote:
Sun Jun 04, 2023 5:40 pm
Why the highly-specific number 991.98px?
Hi. For accurate operation on high -resolution devices. It is bootstrap 5 breakpoint. https://getbootstrap.com/docs/5.2/layout/breakpoints/

Your site uses bootstrap

mikewitherell
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Mar 14, 2022 4:52 pm

Re: Tablet rotation distorts logo in header

Post by mikewitherell » Mon Jun 05, 2023 2:41 pm

Fascinating! Thanks for the interesting reading and for the CSS code! :)

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

Re: Tablet rotation distorts logo in header

Post by Pavel-ww » Tue Jun 06, 2023 9:38 am

You are welcome


Post Reply

Return to “Templates for Joomla! 4.x”