Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IE frameBorder alternative

For this line of code:

<iframe width="600" height="400" frameBorder="0" src="http://stackoverflow.com"></iframe>​

I got this error: (validator.w3.org : XHTML 1.0 Transitional)

there is no attribute "frameBorder"

I'm using frameBorder because IE8 creates some kind of border on iframes. On latest Chrome/Firefox it's fine.

Is there any other, W3C valid, way to remove border form iframe on IE8 ?

like image 458
enloz Avatar asked Apr 03 '12 00:04

enloz


1 Answers

Simply use CSS:

<iframe width="600" height="400" style="border:none;" src="http://www.google.com"></iframe>

p.s. I assume you used stackoverflow in your iFrame tag as an example? Because the site doesn't allow being i-Framed it seems...

like image 65
paddotk Avatar answered Nov 13 '22 02:11

paddotk