Languages
[Edit]
EN

HTML - remove border from iframe

3 points
Created by:
Marley-Marks
712

In this article, we would like to show you how to remove the border from iframe in HTML​​​​​​.

Quick solution:

<iframe src="https://domain.com/example/path" style="border: none"></iframe>

 

Practical example

In this section, we present how to remove the border from iframe using style attribute with CSS border property set to none.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<body>
  <iframe src="https://dirask.com/findings"
		  style="border: none; width: 100%; height: 250px"
		  title="Dirask Findings"></iframe>
</body>
</html>

Border comparison

In this section, we prepared a runnable example that presents the comparison of iframe with and without border.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    body {
        display: flex;
    }

    iframe {
        margin: 10px;
        height: 250px;
    }

  </style>
</head>
<body>
  <iframe src="https://dirask.com/findings" style="border: none" title="Dirask Findings"></iframe>
  <iframe src="https://dirask.com/findings" title="Dirask Findings"></iframe>
</body>
</html>
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join