Menubar flashes to black quickly when landing or browsing

Posted in: Newspaper
Post count: 103

Hello,

My menubar flashes quickly to black and back to white when i land on my website or when i navigate. I set it to white in the theme panel. How can i remove the black flash?

https://www.dagonline.nl

Thanks!

  • This topic was modified 8 years by Eric V.
Post count: 20685

Hi,

I have inspected your website, this is how the menu bar displays for me when browsing
https://www.screencast.com/t/EQHGH2pNqkq4
The black flashes are not present at the moment from what I can tell, or maybe I simply do not see them. Please correct me if I misunderstand something.

Thanks

Post count: 103

Hi Simion,

The quick black flash of the menubar is on mobile, not on laptop/pc. It shows black quickly for a split second and than turns normally white. Its also on other mobile devies. Please check on mobile.

  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

Yes, I see the issue now. That happens because the initial color of the menu is black. This black color is then overridden by the color set in the theme panel. This is basically CSS code, this works in cascade. First the black color is loaded, then the white color follows
https://www.screencast.com/t/GAobBzb3O2
This effect or flash can sometimes be noticeable. In this case what you can do is to make a small modification in the theme stylesheet. Modify the initial color to white as well here
https://www.screencast.com/t/rgVj3orUlUVV
Or remove the background color entirely
https://www.screencast.com/t/aR7Qt5mehB
Try it like that and check the result. Maybe clear the cache as well.

Thanks

Post count: 103

Ok, thanks Simion. I hope i understand correctly. I did the following modification:

a (max-width:767px){.td-header-wrap .td-header-menu-wrap-full,
.td-header-wrap .td-header-menu-wrap,
.td-header-wrap .td-header-main-menu{ background-color: #fff !important; height:54px !important;}
.header-search-wrap .td-icon-search{color:#fff !important;}

Is this correct?

As far as i can see, the issue is fixed.

  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

Yes it is correct. There is no more flashing at the moment, since the black default color has been removed.

Thanks

Post count: 103

Hello,

Because of the new update and overwritten files, my menubar flashes black again. I did my modification by FTP. Can i add a CSS code to the theme to fix this issue? That way i dont have to add the code manually every time their is a theme update.

Thank you!

  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

Modifications to the actual theme files will have to be made after each update. The update means replacing the previous them files. It will have to be made after each update. You could create a child theme and insert the code in the child theme stylesheet, this will not be affected by the theme update. Copy the section of code you are modifying in the child theme stylesheet and make some tests
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thanks

Post count: 103

@simion,

Thank you. But the style.css child folder is ofcourse empty and i dont know from where to grab the code exactly. Can you please provide the code for me so i can paste it in the child theme style folder? That would be great.

Thanks!

Post count: 20685

Hi,

You could copy just the section of code that needs modifying, in the child theme. Like in this example
https://www.screencast.com/t/zVxGlSuyte
https://www.screencast.com/t/K6PexGiv
An additional accolade is necessary at the end of the code in this case.

Thanks

Post count: 103

OK. Should i change the #222 also to #fff in the main style.css sheet? I dont think so, otherwise it wont make any sense

Do i need to activate the Child Theme in some way? I did make the change, but no result.

null

  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
  • This reply was modified 8 years by Eric V.
Post count: 20685

Hi,

Leave the theme stylesheet unmodified. Copy the section of code as shown in the child theme stylesheet. Modify it in the child theme only. Then make tests to see if everything works properly, and there is no flashing.

Thanks

Post count: 103

I did exactly as you told me, but there is no change, still a black flash. I deleted cache also, no result. Please look at my screenshot above, thats what i did and how it is now.

Please help.

Post count: 20685

Hi,

If the issue is still present after modifying the code in the child theme (the child theme must be active) then it would be best to make the modification in the main theme stylesheet, as this method works properly for you.
For me it does not seem to happen anymore at the moment
https://www.screencast.com/t/Wl1Ya3Ugk

Thanks

Post count: 112

Hi guys,

I’m seeing this flash of background colour too. Shouldn’t a ROW BG Color setting override a default “them” background colour??

Alastair

Post count: 22421

Hello,

The row background color is different than the theme background. The theme background is added across the whole site, so a row cannot override it. Please open a new topic and provide an example of the issue you are facing and a link to your site so we can investigate.

Thank you!

Viewing 16 posts - 1 through 16 (of 16 total)
You must be logged in to reply to this topic.