How can I place two headings next to each other using CSS?

后端 未结 3 1546
醉话见心
醉话见心 2021-01-17 14:34
Category
auto

places Category and auto on separate lines, like this:

3条回答
  •  被撕碎了的回忆
    2021-01-17 14:48

    You must change the display mode of the elements. H tags are rendered as BLOCK elements by default. To override this behavior add the following style definitions to your website or CSS

    h5,h6 { display: inline; } 
    

    You can also decide to let them "float" next to each other you can do that via:

    h5,h6 { float: left; } 
    

    Please note that floating only works on block elements (so using both styles will perform no float because inline elements cannot float).

提交回复
热议问题