apply css to just a specific element

cmessallcmessall Registered Users Posts: 2 Beginner grinner
I've figured out how to apply Text over images using css (Using the Title & Caption of images). But if I have 2 or more images on the same page the css styles apply to both those images. I can't figure out how to use the ID's and CSS to apply different styles to each one.

For example: this style will position the text left 5%
.sm-tile-info {
background-color: rgba(150,150,150,0)!important;
font-size: 3vw !important;
line-height:1.2;
position: relative;
top: 10%;
left: 5%;

...and I'd like to position the text left: 50% for the second image.

any help on how to achieve this would be very much appreciated.
Thanks!

Comments

Sign In or Register to comment.