Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

IE Page first view only rendering mistake


Go to End


2 Posts   657 Views

Avatar
MartinPhone

Community Member, 57 Posts

29 March 2012 at 10:10am

Edited: 29/03/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...

Thanks!

Avatar
MartinPhone

Community Member, 57 Posts

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()...

At least IE9 seems to be well behaved!