Answer the question
In order to leave comments, you need to log in
How to remove padding from iframe broadcast from VK?
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Live</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
<body style="text-align: center; align-items: center; transform: rotate(90deg); margin-top: 9%;">
<iframe src="ссылка на трансляцию" width="640" height="360" frameborder="0"
allowfullscreen="allowfullscreen"></iframe>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Your frame is limited in size, positioned in the center (the body has text-align: center and the top indent is margin-top: 9%; in the same place in the body), hence the indent.
set the frame size to 100% and remove the padding:
<body style="text-align: center; align-items: center; transform: rotate(90deg);">
<iframe src="ссылка на трансляцию" width="100%" height="100%" frameborder="0"
allowfullscreen="allowfullscreen"></iframe>
</body>
<body style="margin:0;padding:0;overflow:hidden;transform:rotate(90deg)">
<iframe src="ссылка на трансляцию" style="width:100vw;height:100vh;border:0" allowfullscreen="allowfullscreen"></iframe>
</body>
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Live</title>
<style>
body{
background-color: red;
}
html, body, iframe{
margin: 0;
padding: 0;
}
body {
transform: rotate(90deg);
overflow: hidden;
}
iframe {
width:100vh;
height:100vw;
border:0;
}
</style>
</head>
<body>
<iframe src="https://vk.com/video_ext.php?oid=-186018794&id=456239023&hash=5e067f6f701bf75e"
allowfullscreen="allowfullscreen"></iframe>
</body>
</html>
Add before the closing </head>
:
<style>
html,body,iframe{
margin:0;
padding:0;
}
</style>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question