CSS to align label and input

后端 未结 6 2137
忘掉有多难
忘掉有多难 2020-12-12 17:32

HTML Code Snippet:

6条回答
  •  旧巷少年郎
    2020-12-12 18:00

    Put the every label with its corresponding input into a p tag. Then add the following css:

    label{
      float:left;
      width:100px; //whatever width that suits your needs
    }
    
    p{
        margin:10px 0; //manipulate the vertical spaces for each input..  
    }
    
    
    
    

提交回复
热议问题