Search code examples
cssgoogle-chrome-devtoolsmagento2web-inspectorhtmlelements

Where is this element?


Good day all. I've inspected my page and found the particular element and I wish to style out or delete but it seems not to be attached to any document or sheet in my website, yet it appears automatically on every product page.

I have tried adding visibility: hidden !important to the div element but I don't know where or how or what to make this a reality for me.

Please help me!!!

web url sample of a product page: https://tucsons.ng/index.php/angelo-galasso.html

screenshot of the particular element = enter image description here


Solution

  • It may be generated by some code in Magento and thus hard to find in the theme code base. But have you tried to search in the code base for the id name product-addtocart-button?

    It is still very possible to CSS style this element without having access to the html element itself. In the image below I have here changed the color to blue with CSS only.

    enter image description here

    EDIT: Misunderstood which element you wanted to hide. Sorry about that. You should be able to completely hide it like this in your CSS:

        div.product.pricing {
          display: none;
        }