How do I prevent a line break occurring before an unordered list?

后端 未结 5 1502
迷失自我
迷失自我 2021-01-17 12:48

My web-app framework renders form errors for each field in an unordered list

    immediately following the invalid field. My problem is that I haven\'t b
5条回答
  •  误落风尘
    2021-01-17 13:29

    Do you just want to eliminate the space between the paragraph and the list?

    If so, use:

    ul.errorlist {
        margin-top:0;
    }
    

    Then add "margin-bottom:0;" to the paragraph (or just put the errorlist inside the p tags). If you also want the list to display on a single line, use display:inline as the others suggested.

提交回复
热议问题