iframe Border Issue Solved

Published | Go Back

iOS Safari ren­ders the iframe tag with an old-fash­ioned bor­der even though I set the dis­play prop­erty to none” on that iframe tag. It took me a while to re­al­ize what was miss­ing.

I was us­ing the CSS re­set tech­nique to make browsers ren­der my pages as con­sis­tent as pos­si­ble. I was just re­set­ting the prop­er­ties mar­gin, bor­der, padding, and font for all the tags I used. Guess what. I for­got the iframe tag there. The bor­der dis­ap­peared im­me­di­ately af­ter re­set­ting the iframe tag.

I’m not sure the in­ter­nal mech­a­nisms though. Maybe my case was spe­cial and I did­n’t re­al­ize other con­tribut­ing fac­tors. Nonetheless, you could try this if you run out of ideas in deal­ing with sim­i­lar is­sues.