You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

PrestaShop:如何调整页脚与页面内容间的间距

Hey there! Let's work through your two footer spacing problems step by step:

You mentioned removing the margin from #footer in asylum.css but still seeing extra space—this is often because the spacing is coming from another element above the footer, not the footer itself. Here's how to track and fix it:

  • Inspect the area between your video and footer using Chrome DevTools:
    1. Right-click the empty space and select "Inspect"
    2. Hover over elements in the DevTools panel to identify which container (like #content, a custom video wrapper, or a hidden section) is adding extra padding-bottom or margin-bottom
  • Target the problematic element with custom CSS:
    • If the main content area (#content) has too much bottom padding:
      #content {
        padding-bottom: 20px; /* Adjust to your desired value (default was likely larger) */
      }
      
    • If your video's container has an unwanted bottom margin:
      .video-container { /* Replace with your actual video container class/id */
        margin-bottom: 15px;
      }
      
    • Double-check the footer's own padding (not margin) if space still remains:
      #footer {
        padding-top: 25px; /* Tweak this to reduce space above footer content */
      }
      

To get the footer fixed at the bottom while keeping space between it and the login content, use flexbox for a reliable solution (works for both short and long content):

  • Modify your page container and content area in CSS:
    /* Make the main page container a flex container that spans the full viewport height */
    #page {
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    
    /* Let the content area expand to fill available space, pushing the footer down */
    #content {
      flex: 1;
      margin-bottom: 30px; /* This adds space between login content and footer */
    }
    
    /* Ensure the footer doesn't add extra top space */
    #footer {
      margin-top: 0;
    }
    

Important Note

Always avoid modifying the core asylum.css file directly if possible—use your theme's built-in custom CSS section (if available) or add a custom CSS file to your theme. This prevents your changes from being overwritten when you update the theme.

内容的提问来源于stack exchange,提问作者franfran00

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:53:38