html - How to make an iframe fill an area defined by distance from edges? -
I have an IFrame, which I want to fill in all fields on the page specified below, right, top CSS styles though , When I work by law, it does not work:
HTML:
& lt; Iframe id = "example_frame" src = "http: / /example.com"></iframe>
CSS:
#example_frame {status: absolute; Top: 1 AM; Left: 1am; Correct: 1 AM; Bottom: 1am; }
This is about 100x100 pixels in a small box with a web page
I think because iframes
, you can only see top
, right
, below
, And left
. Should you be able to? Absolutely. But you can not do this instead, you can use a horizontal property ( left
or right < / Code>), and then set both
height
and width
to 100%
.
To obtain the effect you are going for, other non-substitutes like Iframe around a 1em
space, div
Just wrap iframe
in the element.
& lt; Div class = "abs-frame-container" & gt; & Lt; Iframe id = "example_frame" src = "http://example.com" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt;
CSS which produces the effect you are going to:
.bbs-frame-container {position: absolute; Top: 1 AM; Left: 1am; Correct: 1 AM; Bottom: 1am; } .abs-frame-container iframe {status: complete; Top: 0; Left: 0; Border: 0; Height: 100%; Width: 100%; }
See also for problems that the CSS in settings range: 0
will not work in all browsers.
Comments
Post a Comment