Search code examples
htmlcssiframebulma

Remove scrollbar from iframe in bulma


I am building a website which contains an iframe and it is being being styled using bulma. Is there anyway to remove the greyed out scroll bar on the side of the iframe. I have set overflow:hidden but it did not fix the problem. The iframe with the bar is shown below.

example code to demonstrate this:

iframe:

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
    <script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>

</head>

<body style = 'overflow:hidden'>
    <p>hello<p>
</body>

webpage:

<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
    <script defer src="https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>


</head>
<body>  
        <iframe src = 'iframe.html'></body>
        </iframe>
</body>

Solution

  • Adding <html style = 'overflow-y:hidden'> in the iframe removed the scrollbar.