Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
How Would I Crop A HTML IFrame?
Inline Frame is known as iframe in HTML. The tag designates a rectangular area within the content where a different document, complete with scroll bars and borders, may be displayed by the browser. To embed another document inside the current HTML document, use an inline frame.
An element's reference can be specified using the HTML iframe name property. In JavaScript, a reference to an element is also made using the name attribute. Iframes are essentially used to display a webpage inside the one that is now shown. The URL of the document that contains the iframe is specified using the src attribute.
Syntax
Following is the syntax for HTML
For getting better understanding on how would I crop a HTML iframe, let?s look into the following examples.
Example
In the following, we are using the div, making our iframe get cropped, and making no scroll of the iframe display its output.
When the script gets executed, it will generate an output consisting of an iframe that was cropped and gets embedded on the webpage without a scrollable option.
Example
Consider the following example, where we are using the div element and CSS for the iframe to make it crop and display its output.
On running the above script, the output window will pop up, displaying the iframe that gets cropped and displayed on the webpage with scrolling.
Example
Execute the below code and observe how we are going to crop the iframe by running the script and setting scrollable to no.
TutorialsPoint
The Best E-Way Learning
Output
When the script is run, it will generate an output that includes text as well as an iframe that has been cropped, reducing the scrollable to no.
