Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#358994 - 19/06/2013 22:03 Help with CSS !
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
This code formats slightly differently under IE and Chrome:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><body bgcolor=#F0F0F0>

<div style="width: 17px; height: 17px; border-radius: 17px; border-width: 1px; border-style: solid; border-color: #808080; overflow: hidden; vertical-align: middle;">
<iframe style="position: relative; top: -3px; left: -3px;"
src="http://bandcamp.com/EmbeddedPlayer/track=3060672872/bgcol=ffffff/artwork=false/transparent=false/size=short"
seamless>
</iframe>
</div>

</body></html>


I'm trying to get the Bandcamp player to be ensconsed within my circular "div" and have the play button be centered. The play button is correctly centered on Chrome but is off center on IE. I can change the number of pixels of offset on the iFrame, but then that ruins Chrome to make IE look good.

I don't think it's the old "box model" problem because I think I have the correct Doctype at the top that means I'm rendering in standards mode instead of quirks mode. Someone correct me if I'm wrong about that.

Anyone know how to fix this?
_________________________
Tony Fabris

Top
#359005 - 20/06/2013 15:53 Re: Help with CSS ! [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31600
Loc: Seattle, WA
HA. Found it.


The secret: I have to add BORDER:0px; to the style definition for the iFrame.

Internet explorer automatically puts a border around iFrames by default, and Chrome does not. When I specify it, they both work as expected.
_________________________
Tony Fabris

Top