Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1261007

    Hello dear tech; people,
    Not a developer and starting to get confused with the css blabla…

    I’m just trying to set a 1px border to a picture ALB element in one of my pages.
    In a post of the forum, I’ve grabbed that code that works just fine:

    .avia-image-container
    {
       border: 1px solid lightgray;
       padding: 15px;
       } 

    But when I inserted it on my quick css zone, it creates a border to all image all over the site.
    Not what I want.
    So I’ve been searching the forum and try to follow the help for custom ID attributes which if I understand well should give a border to only the element I want.
    I’ve named my image element customID attribute: rv-cadre-image-portfolio wich is quite unique.
    Then… I’ve tried every single possibilities to write the right quick css code but couldn’t manage to make it work.

    Anyone please to help me finsihing and writting this damned little piece of code…. I will thank her/him for ever.

    • This topic was modified 4 years, 1 month ago by rvga. Reason: mispelling
    #1261012

    I found!
    I was trying other possibilities when one worked:
    #rv-cadre-image-portfolio.avia-image-container img

    It does draw the border as expected, I’m happy but is concatenating the css code and the ID attributes the right way to code?

    #1261017

    Hey,

    Glad you figured it out!

    Nothing is wrong with your selector. You can use the code as following as well

    #rv-cadre-image-portfolio img {
       border: 1px solid lightgray;
       padding: 15px;
    }

    Best regards,
    Yigit

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.