Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » IE Page first view only rendering mistake

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

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

Page: 1
Go to End
Author Topic: 333 Views
  • MartinPhone
    Avatar
    Community Member
    57 Posts

    IE Page first view only rendering mistake Link to this post

    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!

  • MartinPhone
    Avatar
    Community Member
    57 Posts

    Re: IE Page first view only rendering mistake Link to this post

    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!

    333 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.