Languages
[Edit]
EN

HTML - remove border from iframe

0 points
Created by:
Marley-Marks
442

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

Quick solution:

<iframe src="url" title="example-title" 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="height:250px; width:100%; border:none;"
		  title="Dirask Findings"></iframe>
</body>
</html>

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: 20px;
    }
  </style>
</head>
<body>
  <iframe src="https://dirask.com/findings"
		  style="height:250px; width:40%; border:none;"
		  title="Dirask Findings"></iframe>
  <iframe src="https://dirask.com/findings"
		  style="height:250px; width:40%;"
		  title="Dirask Findings"></iframe>
</body>
</html>
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