[英]How to make header sticky in prestashop 1.7
i need my website https://alto.7180.eu/it/ to have a sticky header. 我需要我的网站https://alto.7180.eu/it/具有粘性标头。
I tried setting the position to sticky but it seems it's not enough, i think i need to have some other elements set to position relative, but i don't know which ones. 我尝试将位置设置为粘性,但似乎还不够,我想我需要将其他一些元素设置为相对位置,但是我不知道哪个。
I'm using a slightly modified version of the original Classic template for prestashop 1.7.6 我正在为prestashop 1.7.6使用原始Classic模板的稍微修改的版本
As of right now this is the structure of the site: 到目前为止,这是该站点的结构:
<body>
<main>
<header style="position: fixed;">
<!--Header Code with logo, menu... -->
</header>
<!--Page Code-->
</main>
</body>
Could you please help me? 请你帮助我好吗? Feel free to ask anything if needed. 如有需要,请随时提问。 Thanks. 谢谢。
使用z-index: 1
和width: 100%
进行显示。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.