Home
Web CMS (TeamSite)
IE6 iw-component height getting ignored
PaulW
I have a problem which only occurs within TeamSite or LiveSite and only in IE6.
When i view source on a preview of my page I can see the height on the iw_component div gets set as an inline style. And copying this html locally and viewing through browser works fine. But when previewing a page in TeamSite, this height gets replaced with height: auto. Even though the html source has the height correctly set. Other browsers work fine.
This causes a problem for IE6, as my components div height is set to 100% and IE6 requires the parent div to have a height for this to work. SO my component collapses to the height of the content within it. Interestingly, if I disable JavaScript in my browser, the components don't collapse.
So i tried copying the code into a html file outside of teamsite and it worked fine when i removed all my external javascript references. But when i removed all the javascript references from the .page file, it works when i edit a page and preview from there. But when i click on the page directly to preview it, it doesnt' work .
Anyone have any ideas?
TS6.7.1 w/SP1
LS3.0.2.0
Windows Server 2003
Find more posts tagged with
Comments
rexstaples
You might be on the version of SitePublisher which used a javascript block to set the heights of the components to the height of the content inside. If you view source on the preview page do you see a block of code that resembles something like:
for (var i=0; i < divs.length; i++) {
var hasPercentHeight = false;
var elts = divs
.childNodes;
for (var j=0; !hasPercentHeight && (j if (1 == elts.nodeType) {
var h = elts.getAttribute('height') || elts.style.height;
h = h + " ";
if (-1 != h.indexOf('%')) hasPercentHeight = true;
}
}
if (!hasPercentHeight) {
var oldStyleHeight = divs
.style.height;
var expl = divs
.offsetHeight;
divs
.style.height = 'auto';
var auto = divs
.offsetHeight;
if (expl > auto) divs
.style.height = oldStyleHeight;
}
}
?