SKYW4KR Posted April 28, 2020 Share Posted April 28, 2020 I'm trying to target images inside an element with a YUI id for css manipulation, however the YUI id is changing when the page reloads. Repro steps: Inspect element find wrapper with YUI id Open custom css editor add "#yui ... id number" and styling code watch the styling apply correctly in real-time save changes reload page styles are no longer applied because after inspecting the same element, the YUI id has dynamically changed Is this expected behavior? If so, what is the change to my workflow that i need to consider? -lh Link to comment
tuanphan Posted April 28, 2020 Share Posted April 28, 2020 DO NOT USED #YUI- Use #block-yui Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
SKYW4KR Posted April 28, 2020 Author Share Posted April 28, 2020 @tuanphan that worked for a single image, and i'm trying to address changes to a section of images. So your insight gave me an idea to use #page-section-idXXX" .. which seems to have done the trick. Is that an acceptable practice? TYIA!! Link to comment
paul2009 Posted April 28, 2020 Share Posted April 28, 2020 1 hour ago, SKYW4KR said: So your insight gave me an idea to use #page-section-idXXX" .. which seems to have done the trick. Is that an acceptable practice? Yes. Here's my guide to the IDs you should and shouldn't use: In Squarespace, what are the differences between #block-yui and #yui selectors? About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
SKYW4KR Posted April 28, 2020 Author Share Posted April 28, 2020 @paul2009 thank you for the tips! Link to comment
deaton72 Posted June 2, 2020 Share Posted June 2, 2020 @SKYW4KR Did you figure this out? I am trying to stop the links for about 80% of the images/titles on my blog summary post, but there is no block ID for each image/title, they are all yui ids that change each time. I tried disabling the whole summary's links then just forcing the 12 I do need to work... but... My code is as follows with the bold part being what changes (of course) and doesn't work. //remove link in staff blog div#block-yui_3_17_2_1_1590076520498_4551 .summary-title-link { pointer-events: none; } //add link to jordans profile#yui_3_17_2_1_1591131927780_981 .summary-title-link {pointer-events: auto!important;} <--- no block ID that I can see for this image Thoughts? I Link to comment
SKYW4KR Posted June 8, 2020 Author Share Posted June 8, 2020 On 6/2/2020 at 5:24 PM, deaton72 said: @SKYW4KR Did you figure this out? Hi @deaton72, I followed the instructions given by @paul2009 and realized I was targeting the wrong object. Check out his post. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.