EN
HTML - remove border from iframe
3 points
In this article, we would like to show you how to remove the border from iframe in HTML.
Quick solution:
xxxxxxxxxx
1
<iframe src="https://domain.com/example/path" style="border: none"></iframe>
In this section, we present how to remove the border from iframe
using style
attribute with CSS border
property set to none
.
xxxxxxxxxx
1
2
<html>
3
<body>
4
<iframe src="https://dirask.com/findings"
5
style="border: none; width: 100%; height: 250px"
6
title="Dirask Findings"></iframe>
7
</body>
8
</html>
In this section, we prepared a runnable example that presents the comparison of iframe with and without border.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
body {
7
display: flex;
8
}
9
10
iframe {
11
margin: 10px;
12
height: 250px;
13
}
14
15
</style>
16
</head>
17
<body>
18
<iframe src="https://dirask.com/findings" style="border: none" title="Dirask Findings"></iframe>
19
<iframe src="https://dirask.com/findings" title="Dirask Findings"></iframe>
20
</body>
21
</html>