1

Here is the question i posted and got the answer.

https://stackoverflow.com/questions/17780797/set-contents-of-page-according-to-browser-resolution

Every thing is working fine in Firefox and chrome.But Need is that it must work in IE.But It always gives QR Code under Captcha. Here is what I have changed my code.

  <div style="border: 1px solid lightgrey; border-radius: 10px 10px 10px 10px; width: 825px">
        <ul id="holder" style="display:inline-block; list-style-type: none;">

             <li style="display:inline-block; list-style-type: none">
                <div class="captcha" >
                    @Html.Captcha("Refresh", "Enter Captcha", 5, "Is required field.", true)<div style="color: Red;">@TempData["ErrorMessage"]</div>
                </div>
            </li>

            <li style="display:inline-block; list-style-type: none;">
                <div id="qrcode" class="qrcode">
                    <img src="@Url.Action("QrCode", "Qr", new { url = Model.ShortUrl })"  onclick="AppendURL('@this.Model.ShortUrl')"/>
                </div>
            </li>

        </ul>
    </div>

And JS code is :

  window.onresize = getWindowWidthHeight;
window.onload = getWindowWidthHeight;
function getWindowWidthHeight(event) {

    var width = window.innerWidth;
    var height = window.innerHeight;
   // alert(width);
    //alert( $(window).width());
    var firstLi = document.getElementById('holder').children[0];
    if (width > 600) {
        firstLi.style.display = 'inline-block';
    } else {
        firstLi.style.display = 'list-item';
    }
};

Kindly help.Thanks in advance.

Community
  • 1
  • 1
EHS
  • 251
  • 1
  • 2
  • 11
  • which version of ie, you could easily google that "ie display inline-block" returns as first result [this](http://www.keynet.at/blog/story/html-inline-bloecke-in-internet-explorer-co/) – luk2302 Jul 23 '13 at 12:43
  • @luk2302 I am using IE8 – EHS Jul 23 '13 at 12:45
  • @CodeCaster its not duplicate.I am not asking for that question again. – EHS Jul 23 '13 at 12:46
  • 1
    the maybe [this](http://stackoverflow.com/questions/9110646/ie8-display-inline-block-not-working) might help, easily found via google too, learn to use that ressource. – luk2302 Jul 23 '13 at 12:47
  • It is entirely the same subject, just with some extra criteria, or even caused by changes made to your code according to the answers you received there. Please update your old question. – CodeCaster Jul 23 '13 at 12:47
  • @CodeCaster ok.Thanks I will take care of this next time – EHS Jul 23 '13 at 12:48
  • @luk2302 i have tried this but it cant solve my problem. – EHS Jul 23 '13 at 12:53

0 Answers0