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

后端 未结 5 1499
迷失自我
迷失自我 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:20

    What about setting the p tag to display: inline as well? Is that an option?

    p { display: inline; }
    

    As for the p tag issue... I don't believe the W3C specifications allow an unordered list tag within a paragraph tag. From http://www.w3.org/TR/html401/struct/text.html#h-9.3.1:

    The P element represents a paragraph. It cannot contain block-level elements (including P itself).

提交回复
热议问题