29 March 2012 at 10:10am
(Last edited: 29 March 2012 10:11am),
I have made a friend a site - thelittleescape.com (not linked it in case anyone thinks I'm spamming!)
The content wrapper pane (div) has two columns (spans) - Content and a Subnav on the right.
Only in IE, and only the very first time you visit the page, if the Content is taller/longer than the Subnav, the content pane will only be the height of the subnav (ie, too short causing the text to run over into my footer divs).
Refresh, and it's ok. Click away then back, it's ok. Chrome/FF are ok. What gives? IE has its own stylesheet (which doesn't change anything to do with this), but I'm now wondering if this is even a SS problem at all? Anyone got an idea about what's happening? I'm using a bit of JQuery, but I've desperately tried to keep things as simple as possible...
4 April 2012 at 11:22am
FWIW, this was only present in IE7+8, and also only happened *sometimes*, which made it a bit tricky to find.
Anyway it seems that as I hadn't given the image a pre-defined height/width, IE thought it would be sensible to (sometimes) assume it was 0px high to begin with, fill in the text, calculate the container div height and only then put the image in, pushing the text off the bottom. And only sometimes.
I simply put a div with a defined height around the image and all is well. Wondering now if I could have just used $image.SetHeight()...