EN
CSS - how to style iframe
0 points
In this article, we would like to show you how to apply CSS style to iframe element.
In this example, we use id
selector to apply CSS style to the iframe
element which id
value is page
.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
#page {
7
border: none;
8
width: 500px;
9
height: 250px;
10
box-shadow: 10px 10px 8px gray;
11
}
12
13
</style>
14
</head>
15
<body>
16
<iframe id="page" src="https://dirask.com/about" title="Dirask about"></iframe>
17
</body>
18
</html>