Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iframe won't absolute position

Tags:

html

css

iframe

is it possible to absolutely position an iframe? I can position the top and left, but not the bottom and right. I need to do all 4 sides.

HTML

<iframe src="http://apple.com/" id="myframe"></iframe>

CSS

#myframe {
  position: absolute;
  top: 40px;
  left: 40px;
  right: 40px;
  bottom: 40px;
}

check out my fiddle

like image 724
Thomas Lai Avatar asked Mar 11 '13 05:03

Thomas Lai


1 Answers

It's just an Idea, I wrapped my <iframe> with a <div>, look here: jsfiddle.net/bTrfD/1/

<div>
  <iframe src="http://apple.com/" id="myframe"></iframe>
</div>
like image 54
egig Avatar answered Oct 07 '22 21:10

egig