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
Jimmy TrinhJimmy Trinh 

Visualforce styling for lookup field

Hi, I am trying to fix the styling of a lookup field.  I am trying to make it wider but it keeps making the lookup icon wider as well. If you see the image below:

User-added image

I want to be able to close that gap between the icon and the actual text field.  If i click the area between the two it opens the lookup window, so I assume it is just making the clickable area larger but not the actual icon.
SandhyaSandhya (Salesforce Developers) 
Hi Jimmy Trinh,

Are you using style="width: 300px; height: 100px some thing like this.

Please refer below links to get more information.

https://developer.salesforce.com/forums/?id=906F000000094lgIAA
 
http://salesforce.stackexchange.com/questions/67909/how-to-improve-inputfield-alignment-and-width-in-visualforce
 
http://stackoverflow.com/questions/15518531/how-to-control-the-width-and-height-of-input-field-of-a-standard-field
 
http://stackoverflow.com/questions/8920275/how-to-control-the-width-of-an-apex-inputfield-in-a-visualforce-page
 
Hope this helps you!

If this helps you please mark it as solved so that it will be available for others as s proper solution.

Thanks and Regards
Sandhya
Jimmy TrinhJimmy Trinh
Yes, I am using style=”width:45%” but it creates that gap between the lookup icon and text field, even when I use a fixed pixel value