D
D
DARKENN2019-09-11 19:47:33
css
DARKENN, 2019-09-11 19:47:33

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>

5d79249e278ab798046600.jpeg
All that I could do on the screen. You need to completely remove the indents.
padding 0 and margin 0 not working

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey c0re, 2019-09-11
@DARKENN

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>

try this:
<body style="margin:0;padding:0;overflow:hidden;transform:rotate(90deg)">
<iframe src="ссылка на трансляцию" style="width:100vw;height:100vh;border:0" allowfullscreen="allowfullscreen"></iframe>
</body>

this is how it should work:
<!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>

X
xmoonlight, 2019-09-11
@xmoonlight

Add before the closing </head>:

<style>
html,body,iframe{
  margin:0;
  padding:0;
}
</style>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question