I have a paragraph and inside the p an iframe
p > iframe {
position: relative;
padding-bottom: 56.25%;
padding-top: 25px;
height: 0;
}
iframe{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
How to select the iframe parent (ONLY that p) in css - without javascript
The method above p > iframe
doesn`t work. I want to add different style to paragraph and iframe.