- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why cannot I use iframe absolute positioning to set height/width
iFrames are replaced elements and considered different than non-replaced elements. The<div> element is a non-replaced element.
To achieve the same result i.e. to set both the left/right or top/bottom in an iframe, use a div as a wrapper with absolute position, top, left, right, bottom.
Place your iframe with −
width:100% height:100%.
- Related Articles
- Absolute Positioning with CSS
- Absolute Positioning in CSS
- Absolute Positioning Using CSS
- How do I set browser width and height in Selenium WebDriver?
- How I can set the width and height of a JavaScript alert box?
- How to set viewport height and width in CSS
- How to set cell width and height in HTML?
- How to use height and width attributes in HTML?
- How can I set an ImageView's width and height programmatically in Android?
- How to set width and height of an element using jQuery?
- How to use image height and width attribute in HTML Page?
- How can I set an ImageView's width and height programmatically in Android using Kotlin?
- What is the usage of scrollable cursor for absolute positioning?
- How to set the height/width of a Label widget in Tkinter?
- How can I get android device screen height, width?

Advertisements