Fixing the padding within iframes within various browsers.
This commit is contained in:
parent
0291cd67fb
commit
4871d96f84
|
@ -22,3 +22,7 @@
|
|||
width: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.note_frame {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
|
|
@ -526,10 +526,10 @@ h1 {
|
|||
.note_frame {
|
||||
-moz-border-radius: 5px;
|
||||
padding: 0em;
|
||||
margin: 0em;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border: 2px solid #999999;
|
||||
margin: 0em;
|
||||
margin-bottom: 0.75em;
|
||||
background-color: #ffffff;
|
||||
overflow-x: auto;
|
||||
|
@ -538,11 +538,12 @@ h1 {
|
|||
.static_note_div {
|
||||
-moz-border-radius: 5px;
|
||||
display: block;
|
||||
padding: 1.5em 1.25em 1em 1.5em;
|
||||
padding: 0em;
|
||||
margin: 0em;
|
||||
font-family: sans-serif;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border: 2px solid #999999;
|
||||
margin: 0em;
|
||||
margin-bottom: 1em;
|
||||
background-color: #ffffff;
|
||||
overflow-x: auto;
|
||||
|
@ -553,6 +554,9 @@ h1 {
|
|||
}
|
||||
|
||||
.static_note_contents {
|
||||
display: block;
|
||||
padding: 1.5em 1.5em 1em 1.5em;
|
||||
margin: 0em;
|
||||
font-size: 90%;
|
||||
line-height: 140%;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
GECKO = /Gecko/.test( navigator.userAgent ) && !/like Gecko/.test( navigator.userAgent );
|
||||
WEBKIT = /WebKit/.test( navigator.userAgent );
|
||||
IE6 = /MSIE 6\.0/.test( navigator.userAgent );
|
||||
MSIE6 = /MSIE 6\.0/.test( navigator.userAgent );
|
||||
MSIE = /MSIE/.test( navigator.userAgent );
|
||||
OPERA = /Opera/.test( navigator.userAgent );
|
||||
|
||||
|
||||
|
@ -220,8 +221,16 @@ Editor.prototype.set_iframe_contents = function ( contents_text ) {
|
|||
contents_text = "<h3>​";
|
||||
}
|
||||
|
||||
var padding = '1.5em';
|
||||
if ( GECKO )
|
||||
padding = '1.5em 1.5em 1em 1.5em';
|
||||
else if ( MSIE )
|
||||
padding = '1.5em 1.5em 2.25em 1.5em';
|
||||
else if ( WEBKIT )
|
||||
padding = '0.4em 1.5em 1em 1.5em';
|
||||
|
||||
this.document.write(
|
||||
'<html><head><style>html { padding: 1em; } body { font-size: 90%; line-height: 140%; font-family: sans-serif; } h3 { padding-bottom: 0.25em; border-bottom: 1px solid #dddddd; margin-bottom: 0.75em; } a[target ^= "_new"] { background: url(/static/images/web_icon_tiny.png) right center no-repeat; padding-right: 13px; } .diff a[target ^= "_new"] { background-image: none; padding-right: 0; } a:hover { color: #ff6600; } img { border-width: 0; } .left_justified { float: left; margin: 0.5em 1.5em 0.5em 0; } .center_justified { display: block; margin: 0.5em auto 0.5em auto; text-align: center; } .right_justified { float: right; margin: 0.5em 0 0.5em 1.5em; } hr { border: 0; color: #000000; background-color: #000000; height: 1px; } ul { list-style-type: disc; } ul li { margin-top: 0.5em; } ol li { margin-top: 0.5em; } .center_text { text-align: center; } .small_text { padding-top: 0.5em; font-size: 90%; } .indented { margin-left: 1em; } .thumbnail_left { float: left; margin: 0.5em; margin-right: 1em; margin-bottom: 0.5em; border: 1px solid #999999; } .thumbnail_right { float: right; margin: 0.5em; margin-left: 1em; margin-bottom: 0.5em; border: 1px solid #999999; }</style>' +
|
||||
'<html><head><style>html { padding: 0em; margin: 0; } body { padding: ' + padding + '; margin: 0; font-size: 90%; line-height: 140%; font-family: sans-serif; } h3 { padding-bottom: 0.25em; border-bottom: 1px solid #dddddd; margin-bottom: 0.75em; } a[target ^= "_new"] { background: url(/static/images/web_icon_tiny.png) right center no-repeat; padding-right: 13px; } .diff a[target ^= "_new"] { background-image: none; padding-right: 0; } a:hover { color: #ff6600; } img { border-width: 0; } .left_justified { float: left; margin: 0.5em 1.5em 0.5em 0; } .center_justified { display: block; margin: 0.5em auto 0.5em auto; text-align: center; } .right_justified { float: right; margin: 0.5em 0 0.5em 1.5em; } hr { border: 0; color: #000000; background-color: #000000; height: 1px; } ul { list-style-type: disc; } ul li { margin-top: 0.5em; } ol li { margin-top: 0.5em; } .center_text { text-align: center; } .small_text { padding-top: 0.5em; font-size: 90%; } .indented { margin-left: 1em; } .thumbnail_left { float: left; margin: 0.5em; margin-right: 1em; margin-bottom: 0.5em; border: 1px solid #999999; } .thumbnail_right { float: right; margin: 0.5em; margin-left: 1em; margin-bottom: 0.5em; border: 1px solid #999999; }</style>' +
|
||||
'<meta content="text/html; charset=UTF-8" http-equiv="content-type"></meta></head><body>' + contents_text + '</body></html>'
|
||||
);
|
||||
this.document.close();
|
||||
|
|
Reference in New Issue