data-mobile-logo works not as expected

12 replies · opened Jul 2, 2019

AaixtremeJul 2, 2019

Hi,
Though I set a different image source for data-mobile-logo and data-sticky-logo the appearance is not working as expected.
The smaller logo for mobile seems to be enlarged and covers elements left and right.
Do you have an idea?
Thank you for your answer!
aixtreme

SSemicolon WebSTAFFJul 3, 2019

Hello,

The data-mobile-logo Appears to be working fine but since the Default Height of the Logo Image has been set at 100px, it is not displayed as expected. Simply consider adding the following CSS Code:

.device-xs #logo img {
	height: 60px;
	margin-top: 20px;
	margin-bottom: 20px;
}

This should definitely fix the issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AaixtremeJul 3, 2019

Hi,
This definitely fix this issue but produce a new problem when scrolling.
Though I've added the data-sticky-logo attribut (to the same image file) the logo is not shrinking and keeps its margin...
:-(
Please check my updated live url.
Thank you for your answer!
aixtreme

AaixtremeJul 3, 2019

"Default Height of the Logo Image has been set at 100px"
I did not consciously set the height of the logo to 100 px, the default settings should still be effective here.

AaixtremeJul 3, 2019

In addition, in desktop view, the logo now switch to the low resolution image while scrolling and becomes blurred.

SSemicolon WebSTAFFJul 3, 2019

Hello,

Apologies about the Inconveniences caused!

Consider using the following CSS Code:

.device-xs #header:not(sticky-responsive-menu) #logo img {
	height: 60px;
	margin-top: 20px;
	margin-bottom: 20px;
}

In addition, in desktop view, the logo now switch to the low resolution image while scrolling and becomes blurred.

Refreshing the Page should fix this issue.

I did not consciously set the height of the logo to 100 px, the default settings should still be effective here.

The Default Height of 100px has been added in the style.css by default.

This should definitely fix the issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AaixtremeJul 3, 2019

Sorry, but this is not working for me or I did not understand your approach completely.

  1. Should I add both of your suggested CSS code in my custom.css or only the last one?
  2. Should I add data-sticky-logo and/or data-mobile-logo with
    a) different logo files or
    b) always the same logo file
    c) no adding of data-sticky-logo and data-mobile-logo attribut in my logo image ref?
    Assuming 2c), I've added both suggested CSS codes in my custom.css in https://www.aachen-acoustics-colloquium.com/relaunch/temp.html

Not xs viewports are working as expected now, but while switching to xs viewport and scrolling, the logo keeps its margin-top (see attached screenshot).
Variations of margin-top in both of your suggested CSS code (set to 0px or using only your last CSS code) are not working too.
https://www.aachen-acoustics-colloquium.com/relaunch/temp2.html
https://www.aachen-acoustics-colloquium.com/relaunch/temp3.html
https://www.aachen-acoustics-colloquium.com/relaunch/temp4.html
https://www.aachen-acoustics-colloquium.com/relaunch/temp5.html

Got the feeling that there is no switch while starting to scroll.
Is "not(sticky-responsive-menu)" correct named (please see respective screenshot)

Thanks for your answer!
aixtreme

SSemicolon WebSTAFFJul 3, 2019

Hello,

Please delete the CSS Codes we had provided you with earlier and use the following CSS Code:

.device-xs #header:not(.sticky-responsive-menu) #logo img {
    height: 60px;
    margin-top: 20px;
    margin-bottom: 20px;
}

If you are not using a differently styled logo and just planning to change the sizing of the Logo, then it is not recommended to use the data-sticky-logo and data-mobile-logo Attributes. Consider checking this Template: http://themes.semicolonweb.com/html/canvas/logo-changer.html .

This should fix your issues. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AaixtremeJul 4, 2019

Hi,
Unfortunately this is not fixing the margin-top problem while scrolling.
(see https://www.aachen-acoustics-colloquium.com/relaunch/temp.html updated according to your recommendation)
If I add the following CSS code:

.device-xs #header.responsive-sticky-header #logo img {
    height: 60px;
    margin-top: 0px;
    margin-bottom: 20px;
}

the margin-top problem while scrolling is fixed but there is no smooth logo animation as usual but only a hard jump to the top position.
Not really professional :-(
https://www.aachen-acoustics-colloquium.com/relaunch/temp2.html

Thanks for your answer
aixtreme

SSemicolon WebSTAFFJul 4, 2019

Hello,

Thanks for your Continued Patience on this. Delete all the previous CSS Codes and use the following Code:

#logo img {
	-webkit-transition: height .4s ease, opacity .3s ease, margin .4s ease;
	-o-transition: height .4s ease, opacity .3s ease, margin .4s ease;
	transition: height .4s ease, opacity .3s ease, margin .4s ease;
}

.device-xs #header:not(.responsive-sticky-header) #logo img {
    height: 60px;
    margin-top: 20px;
    margin-bottom: 20px;
}

This should fix all the issues. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

AaixtremeJul 4, 2019

Yeah!
This is working as intended.
Thank you!

SSemicolon WebSTAFFJul 5, 2019

Hello,

Really Glad that your issues were resolved.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard