Div with margin-left and width:100% overflowing on the right side

后端 未结 6 470
太阳男子
太阳男子 2021-02-04 02:28

I have 2 nested div\'s that should be 100% wide. Unfortunately the inner div with the Textbox overflows and is actually larger than the outer div. It has a left margin and overf

6条回答
  •  春和景丽
    2021-02-04 03:27

    Add some css either in the head or in a external document. asp:TextBox are rendered as input :

    input {
         width:100%;
    }
    

    Your html should look like : http://jsfiddle.net/c5WXA/

    Note this will affect all your textbox : if you don't want this, give the containing div a class and specify the css.

    .divClass input {
         width:100%;
    }
    

提交回复
热议问题