# Getting CSS class for widget elements

**URL:** <https://community.elfsight.com/t/getting-css-class-for-widget-elements/162403>\
**Category:** Pro Tips\
**Tags:** accessibility\
**Created:** [May 31, 2026, 12:44am UTC](https://community.elfsight.com/t/getting-css-class-for-widget-elements/162403 "2026-05-31T00:44:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Wilson](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/bob_wilson/32/92862_2.png) [@Bob\_Wilson](https://community.elfsight.com/u/Bob_Wilson)\
**Post date:** [May 31, 2026, 12:44am UTC](https://community.elfsight.com/t/getting-css-class-for-widget-elements/162403/1 "2026-05-31T00:44:12Z")

</div>

I was about to post a question on how to capture the class for an element I can’t get focus on… namely, the Reading Line in the Accessibility widget. Normally this is done by loading the widget in the edit function and then enabling Chrome’s **Element Inspecto** r tool via pressing F12 or Ctrl+Shift+C). I prefer the Ctrl+Shift+C method when working on Elfsight widgets as it always opens to the correct tab (Elements); F12 opens to the tab that was last opened.

By accident, I discovered I _could_ get focus on the element in question if I opened the inspector tool on a webpage where the widget was published. Maybe this will help someone with a similar issue.

BTW, the simple CSS I came up with is below… the RGBA value for #003366 with 95% opacity. The obvious choice for my site palette would be a greenish shade, but since this is an accessibility widget, and green is often confused with reds and browns for many forms of color blindness, I opted for this dark hue called “Prussian Blue.”  
`[class*=“reading-line__Line-sc”] {`  
` background-color: rgba(0, 51, 102, 0.95)`  
`}`

---

<div class="post-metadata">

**Author:** ![Helga](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/helga/32/1155_2.png) [@Helga](https://community.elfsight.com/u/Helga)\
**Post date:** [June 1, 2026, 8:54am UTC](https://community.elfsight.com/t/getting-css-class-for-widget-elements/162403/2 "2026-06-01T08:54:23Z")

</div>

Great insight, thanks a lot for sharing, Bob!

Really appreciate the CSS example you included. I also love your approach to choosing colours for the Accessibility widget - considering accessibility needs first is exactly the right thing to do 🙏🏻

---

<div class="post-metadata">

**Author:** ![Max](https://sea2.discourse-cdn.com/flex020/user_avatar/community.elfsight.com/max/32/710_2.png) [@Max](https://community.elfsight.com/u/Max)\
**Post date:** [June 1, 2026, 12:43pm UTC](https://community.elfsight.com/t/getting-css-class-for-widget-elements/162403/5 "2026-06-01T12:43:06Z")

</div>

Thanks a lot for sharing your expertise, Bob! We truly appreciate it 😊

By the way, we have a detailed guide on creating CSS codes that might come in handy. Feel free to check it out: [Guide to CSS Codes](https://community.elfsight.com/t/guide-to-css-codes/140803)
