How to make a HTML list appear horizontally instead of vertically using CSS only?

后端 未结 3 1049
轮回少年
轮回少年 2020-12-07 22:30

I need this because I want to make a menu (which is made from a HTML list) appear horizontally.

I prefer not to use absolute positioning since it might become messy

3条回答
  •  不思量自难忘°
    2020-12-07 23:17

    You will have to use something like below

    #menu ul{
      list-style: none;
    }
    #menu li{
      display: inline;
    }
    	

提交回复
热议问题