Label and text box on the same line using css

前端 未结 4 820
离开以前
离开以前 2020-12-08 15:30

When creating a new asp.net mvc3 app you get the logon and register form with a label above the text field. I want to change it so that both the label and field are on the s

4条回答
  •  离开以前
    2020-12-08 16:08

    Although i have not tried the accepted answer by kinakuta, it requires you to re-arrange the Visual Studio generated view; I would approach as follows, if you don't want to re-arrange the autogenerated layout., i.e. to keep the format

    etc...

    The following CSS appears to work for me. Feel free to offer improvements. (it looks very similar to the answer by Pa0l0)

    
    

提交回复
热议问题