I have an iframe that is going to be implemented in various pages. I'm trying to add CSS media queries inside of it, so that it works differently on different devices. But the CSS media queries get the iframe's width, not the actual page. Is there a way to do this with CSS and not Javascript?
The iframe is coming from the same domain, and on desktop, it should have a fixed width, while on mobile i'm trying to set it a fluid width.
So far I tried using normal media queries like:
@media (max-width: 768px){
//css here
}
But this returns always true because the iframe is < 768px;