MediaWiki:Common.css: Difference between revisions
No edit summary |
No edit summary |
||
| Line 111: | Line 111: | ||
padding: 10px; /* Your eras-table padding */ | padding: 10px; /* Your eras-table padding */ | ||
} | } | ||
} | |||
.youtube-responsive { | |||
position: relative; | |||
width: 100%; /* Full width of parent */ | |||
padding-bottom: 56.25%; /* 16:9 aspect ratio */ | |||
height: 0; /* Collapses div height, relies on padding */ | |||
overflow: hidden; /* Prevents spillover */ | |||
} | |||
.youtube-responsive iframe { | |||
position: absolute; | |||
top: 0; | |||
left: 0; | |||
width: 100% !important; /* Overrides inline width */ | |||
height: 100% !important; /* Overrides inline height */ | |||
max-width: 100%; /* Ensures it doesn’t exceed container */ | |||
box-sizing: border-box; /* Includes padding/borders in size */ | |||
} | } | ||