function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Harikrishna MandadapuHarikrishna Mandadapu 

how to align multiselect picklist fields in visualforce page

I am using the below Jquery snippet to allign. It is looking good, but after I select any value alignment is getting disturbed. Can anyone help me out of this.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> 
    <script type="text/javascript">
        var $j = jQuery.noConflict();
        $j(document).ready(function() {
            setTimeout(function() {
                $j('select.myMultiClass').each(function(i, val) { 
                    $j(val).width(100);
                    $j(val).height(150);
                })
            },100);
        });
    </script>
Harikrishna MandadapuHarikrishna Mandadapu
User-added image
Please refer to the screenshots after loading the page and adding a value from the picklist.
karthikeyan perumalkarthikeyan perumal
Hello, 

Thats is the standard behaviour of that binding inputField for Multipicklist, i dont think you can change it via CSS, or Style  else if you wanna really change the you have to write your own component with out  inputField binding. you have to use it in you VF page, 

Follow the link below for creating component and use it in your VF page, 

https://hisrinu.wordpress.com/2011/05/30/custom-multi-select-picklist-field-in-visualforce/    (without having component).

http://sfdcintegration.blogspot.in/2015/08/multiselect-picklist-in-visualforce-page.html ( with component) 

Hope it will help you, 
Mark it solved if its helps you. 

Thanks
karthik