html - How can I make an iframe inside of a <td> 33 percent of the screen width? -
i have frame inside of <td> element. i'd dynamically scale iframe takes 33% of screen width (and automatically fixes height).
when try this:
<iframe src="google drive presentation url" frameborder="0" width="33vw" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe> it takes 33% of <td> element (which has text in it).
also, tried using width="33%" didn't work either.
how can fix this?
you must give width using css instead.
body { margin: 0 } td { width: 33.3%; background: red } iframe { width: 100% } <table> <tr> <td> <iframe src="google drive presentation url" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe> </td> <td> foo bar </td> <td> foo bar </td> </tr> </table>
Comments
Post a Comment