How to access a span in a class but i can not change the html File

yotube
0

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:I need to access the thing in the blue circle

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
Tags

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top