Home > DeveloperSection > Forums > Google Chrome not rendering overflow correctly
Ankit Singh

Total Post:341

Points:2389
Posted on    August-22-2014 12:48 AM

 ASP.Net ASP.Net 
Ratings:


 1 Reply(s)
 694  View(s)
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



Sumit Kesarwani

Total Post:378

Points:2694
Supported
Posted on    August-22-2014 1:50 AM

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>


Don't want to miss updates? Please click the below button!

Follow MindStick