What is the best way to have WebForms ComboBox's width reach to the end of the content

Brian Tan 40 Reputation points

I am currently working with WebForm's ComboBox and I am trying to make it reach to the end of the content.

I currently have the CSS looking like this

.CustomComboBoxStyle .ajax__combobox_textboxcontainer input {     
	background-color: #ADD8E6;     
	border: solid 1px Blue;     
	border-right: 0px none;     
	width: 100%; 

but the combobox doesn't reach all the way despite the width being 100%.

How can I make the combo box reach to the end of the content?

ASP.NET Web Forms
ASP.NET Web Forms
A part of the ASP.NET web application framework that can be used to create ASP.NET web applications.
658 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XuDong Peng-MSFT 6,786 Reputation points Microsoft Vendor

    Hi @Brian Tan,

    As far as I know, this problem may occur due to borders or paddings and margins between page elements. You can try to cancel the element width limit by setting max-width:none;.

    .CustomComboBoxStyle {
        width: 1000px;
    .CustomComboBoxStyle input {
        max-width: none;
        background-color: #ADD8E6;
        border: solid 1px Blue;
        width: 100%;
    <div class="CustomComboBoxStyle">
    <input type="text" id="CustomInput" name="CustomInput">



    Best regards,

    Xudong Peng

    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.