Magnitus
Oct 27th, 2010, 10:57 PM
k, I used jQuery to dynamically frame webpage content inside some art (which has pictures defined for the corners, the bottom, the left, the right as well as some repeating background picture inside the frame).
Additionally, there is repeating background image for outside the frame.
I renders everything without problem on my desktop for the following browsers: Opera, Google Chrome, Safari, Firefox and IE7.
Recently, I ran it on my laptop and it was rendered without problem for the above browsers, except for IE8 where the following problems were encountered:
1) Despite the fact that the background images for the frame's content are 50x50 pixels and that the frame's content is 500x500 pixels, there seems to be enough slack space at the right and bottom of the frame's content for the background picture to partially repeat itself both at the right and bottom (undesirable result, I was hoping that if the dimensions of the frame's content are always an integer multiple of 50 pixels, I wouldn't have clipped repeating pictures at the fringes).
2) Some repeated background pictures both inside and outside the frame are just messed up (some are out of alignment, some that are not at the fringes of their container are clipped in weird places and IE seems to unsuccessfully try to fix their appearance when I click on the background).
After some frustration, I decided to remove all the jQuery logic and instead copy-paste a static version of the DOM (as shown in IE's development tools) that appared once jQuery had done its work to see if the problem would go away. It didn't.
Here is the html and the accompanying csses (modified a bit to remove sensitive content like paths and embedded python code):
html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<LINK rel=stylesheet type=text/css href="SomePathIDontWantToShow/index.css">
<LINK rel=stylesheet type=text/css href="SomePathIDontWantToShow/generic.css">
</head>
<BODY class=Main_background>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 238px" class=Main_title></DIV>
<DIV style="POSITION: absolute; WIDTH: 600px; HEIGHT: 600px; TOP: 150px; LEFT: 237px" class=Frame>
<DIV style="POSITION: absolute; TOP: 50px; LEFT: 50px" class="Content Content_background"></DIV>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 0px" class=Content_top_left></DIV>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 550px" class=Content_top_right></DIV>
<DIV style="POSITION: absolute; TOP: 550px; LEFT: 0px" class=Content_bottom_left></DIV>
<DIV style="POSITION: absolute; TOP: 550px; LEFT: 550px" class=Content_bottom_right></DIV>
<DIV style="POSITION: absolute; WIDTH: 500px; TOP: 0px; LEFT: 50px" class=Content_top></DIV>
<DIV style="POSITION: absolute; WIDTH: 500px; TOP: 550px; LEFT: 50px" class=Content_bottom></DIV>
<DIV style="POSITION: absolute; HEIGHT: 500px; TOP: 50px; LEFT: 0px" class=Content_left></DIV>
<DIV style="POSITION: absolute; HEIGHT: 500px; TOP: 50px; LEFT: 550px" class=Content_right></DIV></DIV></BODY></HTML>
</html>
index.css:
body, table, tr, td, th, thead, tfoot, label, h1, h2, h3, h4, h5, h6, p, ul, li, ol, pre, textarea, div {
border: 0px;
margin: 0px;
outline: 0px;
padding: 0px;
}
div.Content{
position: absolute;
top: 0px;
left: 0px;
height: 500px;
min-height: 500px;
width: 500px;
min-width: 500px;
}
generic.css:
body, table, tr, td, th, thead, tfoot, label, h1, h2, h3, h4, h5, h6, p, ul, li, ol, pre, textarea, div {
border: 0;
margin: 0;
outline: 0;
padding: 0;
}
div.Main_title{
height: 150px;
min-height: 150px;
width: 600px;
min-width: 600px;
background: url('../images/Title.png');
}
body.Main_background{
background: url('../images/Background.png') repeat;
}
div.Content_background{
background: url('../images/Content_background.png') repeat;
}
div.Content_top_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top_left.png') no-repeat;
}
div.Content_top{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top.png') repeat-x;
}
div.Content_top_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top_right.png') no-repeat;
}
div.Content_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_left.png') repeat-y;
}
div.Content_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_right.png') repeat-y;
}
div.Content_bottom_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom_left.png') no-repeat;
}
div.Content_bottom{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom.png') repeat-x;
}
div.Content_bottom_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom_right.png') no-repeat;
}
All the pictures are 50x50 pixels, except for "Title" which is 600x150 pixels.
Any insight in the problem would be greatly appreciated.
PS: Yes, I know that the main title and frame are misaligned by 1 pixel. Its on my "to do" list.
Additionally, there is repeating background image for outside the frame.
I renders everything without problem on my desktop for the following browsers: Opera, Google Chrome, Safari, Firefox and IE7.
Recently, I ran it on my laptop and it was rendered without problem for the above browsers, except for IE8 where the following problems were encountered:
1) Despite the fact that the background images for the frame's content are 50x50 pixels and that the frame's content is 500x500 pixels, there seems to be enough slack space at the right and bottom of the frame's content for the background picture to partially repeat itself both at the right and bottom (undesirable result, I was hoping that if the dimensions of the frame's content are always an integer multiple of 50 pixels, I wouldn't have clipped repeating pictures at the fringes).
2) Some repeated background pictures both inside and outside the frame are just messed up (some are out of alignment, some that are not at the fringes of their container are clipped in weird places and IE seems to unsuccessfully try to fix their appearance when I click on the background).
After some frustration, I decided to remove all the jQuery logic and instead copy-paste a static version of the DOM (as shown in IE's development tools) that appared once jQuery had done its work to see if the problem would go away. It didn't.
Here is the html and the accompanying csses (modified a bit to remove sensitive content like paths and embedded python code):
html:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<LINK rel=stylesheet type=text/css href="SomePathIDontWantToShow/index.css">
<LINK rel=stylesheet type=text/css href="SomePathIDontWantToShow/generic.css">
</head>
<BODY class=Main_background>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 238px" class=Main_title></DIV>
<DIV style="POSITION: absolute; WIDTH: 600px; HEIGHT: 600px; TOP: 150px; LEFT: 237px" class=Frame>
<DIV style="POSITION: absolute; TOP: 50px; LEFT: 50px" class="Content Content_background"></DIV>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 0px" class=Content_top_left></DIV>
<DIV style="POSITION: absolute; TOP: 0px; LEFT: 550px" class=Content_top_right></DIV>
<DIV style="POSITION: absolute; TOP: 550px; LEFT: 0px" class=Content_bottom_left></DIV>
<DIV style="POSITION: absolute; TOP: 550px; LEFT: 550px" class=Content_bottom_right></DIV>
<DIV style="POSITION: absolute; WIDTH: 500px; TOP: 0px; LEFT: 50px" class=Content_top></DIV>
<DIV style="POSITION: absolute; WIDTH: 500px; TOP: 550px; LEFT: 50px" class=Content_bottom></DIV>
<DIV style="POSITION: absolute; HEIGHT: 500px; TOP: 50px; LEFT: 0px" class=Content_left></DIV>
<DIV style="POSITION: absolute; HEIGHT: 500px; TOP: 50px; LEFT: 550px" class=Content_right></DIV></DIV></BODY></HTML>
</html>
index.css:
body, table, tr, td, th, thead, tfoot, label, h1, h2, h3, h4, h5, h6, p, ul, li, ol, pre, textarea, div {
border: 0px;
margin: 0px;
outline: 0px;
padding: 0px;
}
div.Content{
position: absolute;
top: 0px;
left: 0px;
height: 500px;
min-height: 500px;
width: 500px;
min-width: 500px;
}
generic.css:
body, table, tr, td, th, thead, tfoot, label, h1, h2, h3, h4, h5, h6, p, ul, li, ol, pre, textarea, div {
border: 0;
margin: 0;
outline: 0;
padding: 0;
}
div.Main_title{
height: 150px;
min-height: 150px;
width: 600px;
min-width: 600px;
background: url('../images/Title.png');
}
body.Main_background{
background: url('../images/Background.png') repeat;
}
div.Content_background{
background: url('../images/Content_background.png') repeat;
}
div.Content_top_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top_left.png') no-repeat;
}
div.Content_top{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top.png') repeat-x;
}
div.Content_top_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_top_right.png') no-repeat;
}
div.Content_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_left.png') repeat-y;
}
div.Content_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_right.png') repeat-y;
}
div.Content_bottom_left{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom_left.png') no-repeat;
}
div.Content_bottom{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom.png') repeat-x;
}
div.Content_bottom_right{
height: 50px;
min-height: 50px;
width: 50px;
min-width: 50px;
background: url('../images/Content_bottom_right.png') no-repeat;
}
All the pictures are 50x50 pixels, except for "Title" which is 600x150 pixels.
Any insight in the problem would be greatly appreciated.
PS: Yes, I know that the main title and frame are misaligned by 1 pixel. Its on my "to do" list.