Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何对齐粘性页脚内的按钮_Css - Fatal编程技术网

Css 如何对齐粘性页脚内的按钮

Css 如何对齐粘性页脚内的按钮,css,Css,尝试将左右两侧的按钮对齐,但不起作用。如何将左右两侧的按钮对齐 若我为左侧添加更多按钮,则左侧按钮从左侧开始移动到右侧 如果我为中间添加更多按钮,中间按钮从中间侧开始移动到右侧和左侧 若我为右侧添加更多按钮,则右侧按钮从右侧开始移动到左侧 我想在左边,中间,右边正确地显示按钮 如果有人知道,请帮助找到解决方案 <footer class="footer"> <div class="ct-footer-post"> <div class="con

尝试将左右两侧的按钮对齐,但不起作用。如何将左右两侧的按钮对齐 若我为左侧添加更多按钮,则左侧按钮从左侧开始移动到右侧

如果我为中间添加更多按钮,中间按钮从中间侧开始移动到右侧和左侧

若我为右侧添加更多按钮,则右侧按钮从右侧开始移动到左侧

我想在左边,中间,右边正确地显示按钮

如果有人知道,请帮助找到解决方案

  <footer class="footer">
   <div class="ct-footer-post">
      <div class="container">

         <div class="inner-left">

            <button>
            Left btn 1
            </button>

            <button>
             Left btn 2
            </button>

            <button>
             Left btn 3
            </button>

           </div>

         <div class="inner-center">

            <button>
            Center btn 1
            </button>

            <button>
             Center btn 2
            </button>

            <button>
             Center btn 3
            </button>

         </div>

         <div class="inner-right">

            <button>
             Right btn 1
            </button>

            <button>
             Right btn 2
            </button>

            <button>
             Right btn 3
            </button>

         </div>

      </div>
   </div>
</footer>

左btn 1
左btn 2
左btn 3
中心btn 1
中心btn 2
中心btn 3
右btn 1
右btn 2
右btn 3
演示:

使用flex box

.container {
    display: flex;
    justify-content: space-between;
}

您可以将按钮放入固定宽度的容器中。您可以编辑JSFIDLE吗?希望它能帮助您。:)你到底想要什么?未收到问题寻求代码帮助的问题必须包含在问题本身中重现问题所需的最短代码,最好是在堆栈片段中。虽然您提供了一个链接,但如果该链接无效,您的问题对其他将来遇到相同问题的用户将毫无价值。看见
.container {
  display: flex;
  flex-direction: row;
}