DangDang Posted January 10 Share Posted January 10 (edited) I have a black logo on my website which I managed to invert to white on the home page, with help from other threads in this forum. Works great with the slideshow, the only problem is on the mobile version. When I access the burger menu (which is white) from the homepage, the logo looks weird/semi-transparent. If I access it from the other pages on the site, it's black, which looks better. See screenshots below The CSS code I used for inverting the logo on the homepage is the following: body[class*="home"] header#header img { filter: invert(1) !important; -webkit-filter: invert(1); } Edited February 28 by DangDang Link to comment
tuanphan Posted January 11 Share Posted January 11 To invert on overlay menu, use this code body.header--menu-open header#header img { filter: invert(1) !important; -webkit-filter: invert(1); } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
DangDang Posted January 11 Author Share Posted January 11 @tuanphan thanks for the answer! Unfortunately, it had the opposite effect - with that code it looks like this when accessing the overlay menu from all pages (before, it was fine in all pages except the home page). Link to comment
DangDang Posted January 11 Author Share Posted January 11 If it’s not possible to not invert the logo in the overlay menu, i guess a workaround might be to have another file as the logo only for the overlay menu. Then I can upload the black version and try to resize it to fit the normal header logo (which I upscaled in squarespace). Anyone have any suggestions for how to do this? Link to comment
tuanphan Posted January 13 Share Posted January 13 So what should it look like on overlay menu? And it should like that on which page? That above code will invert overlay menu logo on all pages Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
DangDang Posted January 15 Author Share Posted January 15 (edited) @tuanphan I want it to be black (see attached image) like this on the overlay menu, as well as all pages except the home page: To summarize: The only place I want it to be inverted is the homepage, and the problem I currently have is that when I invert it on the home page, it becomes inverted on the overlay menu as well - when accessing the overlay menu from the home page. The logo is black when accessing the overlay menu from the other pages, but I want it to be black even when accessing the overlay menu from the home page. Edited January 15 by DangDang Link to comment
Solution tuanphan Posted January 16 Solution Share Posted January 16 So to make it black on Homepage - When overlay menu is open, use this CSS code (Don't remove any code in your current code body.homepage.header--menu-open header#header img { filter: invert(0) !important; -webkit-filter: invert(0) !important; } DangDang 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
DangDang Posted January 16 Author Share Posted January 16 That solved it! Exactly what i needed, thank you! Link to comment
ccxwood Posted January 29 Share Posted January 29 On 1/16/2024 at 12:28 AM, tuanphan said: So to make it black on Homepage - When overlay menu is open, use this CSS code (Don't remove any code in your current code body.homepage.header--menu-open header#header img { filter: invert(0) !important; -webkit-filter: invert(0) !important; } @tuanphan I would like to apply this exact solution to one specific item that's not on the homepage. Specifically #item-64bf680894c511552be6a23a How would I restructure this code to target that item during the menu overlay? Link to comment
tuanphan Posted February 1 Share Posted February 1 On 1/30/2024 at 5:01 AM, ccxwood said: @tuanphan I would like to apply this exact solution to one specific item that's not on the homepage. Specifically #item-64bf680894c511552be6a23a How would I restructure this code to target that item during the menu overlay? Use the code body#item-64bf680894c511552be6a23a.header--menu-open header#header img { filter: invert(0) !important; -webkit-filter: invert(0) !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
drhender Posted March 14 Share Posted March 14 My website: https://thedolphinsquartet.com I have attempted to follow and use this advice closely to solve a seemingly very similar, if not the same, problem. But it is still not working for me - very close, but not fully working. I have uploaded a Header Logo Image that is all black with a transparent background. I need this logo to appear as black on the homepage, but on all other pages I need it to appear as white. When the mobile navigation menu is open, I need this logo to appear as black on ALL pages. I have used the following CSS code to effect these outcomes: body:not(.homepage),not(.header--menu-open) header#header img { filter: invert(1); -webkit-filter: invert(1); } The header logo appears fine on ALL desktop and mobile pages (black on homepage and white on all others). The header logo appears correct (black) when the mobile menu is open on the homepage, but incorrect (white) when the mobile menu is open on all other pages. Can you help me correct it? Link to comment
tuanphan Posted March 15 Share Posted March 15 On 3/14/2024 at 7:06 AM, drhender said: My website: https://thedolphinsquartet.com I have attempted to follow and use this advice closely to solve a seemingly very similar, if not the same, problem. But it is still not working for me - very close, but not fully working. I have uploaded a Header Logo Image that is all black with a transparent background. I need this logo to appear as black on the homepage, but on all other pages I need it to appear as white. When the mobile navigation menu is open, I need this logo to appear as black on ALL pages. I have used the following CSS code to effect these outcomes: body:not(.homepage),not(.header--menu-open) header#header img { filter: invert(1); -webkit-filter: invert(1); } The header logo appears fine on ALL desktop and mobile pages (black on homepage and white on all others). The header logo appears correct (black) when the mobile menu is open on the homepage, but incorrect (white) when the mobile menu is open on all other pages. Can you help me correct it? Don't remove any code in your current code. use this CSS code body.header--menu-open:not(.homepage) header#header img { filter: invert(0) !important; -webkit-filter: invert(0) !important; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
drhender Posted March 15 Share Posted March 15 @tuanphan That worked perfectly. Thank you so much for your help!!! tuanphan 1 Link to comment
drhender Posted March 18 Share Posted March 18 @tuanphan Is there a selector in CSS to target ALL the EVENT DETAILS pages? I have the same problem on the EVENT DETAILS page for each individual event I add - Header Logo Image is inverted, and I want it NOT to be inverted. Thanks Link to comment
tuanphan Posted March 20 Share Posted March 20 On 3/19/2024 at 4:30 AM, drhender said: @tuanphan Is there a selector in CSS to target ALL the EVENT DETAILS pages? I have the same problem on the EVENT DETAILS page for each individual event I add - Header Logo Image is inverted, and I want it NOT to be inverted. Thanks Use this code body[class*="type-events"].view-item header#header img { filter: invert(0) !important; -webkit-filter: invert(0) !important; } if it doesn't work, you can share link to an event, I can check easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment