How do I align spans or divs horizontally?

后端 未结 10 1023
礼貌的吻别
礼貌的吻别 2020-12-04 10:33

My only problem is making them line up three-across and have equal spacing. Apparently, spans can not have width and divs (and spans with display:block) don\'t appear horizo

10条回答
  •  感动是毒
    2020-12-04 11:10

    What you might like to do is look up CSS grid based layouts. This layout method involves specifying some CSS classes to align the page contents to a grid structure. It's more closely related to print-bsed layout than web-based, but it's a technique used on a lot of websites to layout the content into a structure without having to resort to tables.

    Try this for starters from Smashing Magazine.

提交回复
热议问题