GOOGLE CHROME NOT RENDERING OVERFLOW CORRECTLY

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
 948  View(s)
Ratings:
Rate this:

I just found this ASP.Net server control horizontal scroll not working when align=right attribute is used! I digged into the HTML generated code and found something like this:

<div align="right" style="overflow:scroll; width: 200px; height:200px;">

    <div style="width:400px; height:400px">

    </div>

</div>

The horizontal scrollbar appears the moment you remove the align="right" attribute. Tested in Chrome 17/18. It works fine in Firefox 10 and IE 10

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Google Chrome not rendering overflow correctly

    Hi Ankit, 

    try this:

    <script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"L></script>

        <script type="text/javascript">

    ​        $('[align="right"]')​.css('float', 'right').removeAttr('align');​​​​​​​​​​​​​

        </script>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!