Issue
I have a Question in regards to CSS. I have a given Layout and can only writte CSS comands to access the given html text to style it.
The Problem is the span that i try to access has no Id or is in a class. The html tree is consistant throughout the whole html File. So if i can access this specific span it should change all spans who are aranged in the file.
I am by all means no CSS expert but i tried it with first-child etc. but it didnt work. Here a picture:
If someone who has more expiriance in this topic would help me, i would appriciate it very much. Steven
Solution
A useful selector in this situation could be the adjecent sibling selector:
#FzBoard_Image_1232 + span {...}
Keep in mind you can select the image before the span however you like and it doesnt have to be by class, a simple img + span
would work but youre risking selecting more elements in the document so its always good to make it as specific as possible
Alternatively this could work too:
span.ui-button-text > span:first-of-type {..}
Answered By - Blye