I'd like to change the width of PDF iframe embeds โ would it be possible to add a class to these so I can target them?
You can target these PDF embeds with a CSS attribute selector. Let's say you have an embed that looks like this:
<iframe src="/files/example.pdf"></iframe>
You can target this and others like it in CSS like so:
iframe[src$=".pdf"] {
width: 100px
}
Answered a year ago ยท
Improve this answer