在css中创建一个页脚块(Create a Footer Block in css)

编程入门 行业动态 更新时间:2024-10-22 23:23:36
在css中创建一个页脚块(Create a Footer Block in css)

我正在为我的网站创建一个页脚块。 我不是css的专家。 我期待在左侧和右侧创建一个带填充的块。

附件是页脚块的示例,我希望创建:

但是,我创建的页脚块跨越整个屏幕。 知道什么可能是错的吗?

这是我的css代码:

#footer-row1{ margin-top: 80px; padding: 1.2em 0; background: #000; bottom: 0; margin-right: -33px; font-family: "Fjalla One", Verdana, Geneva, sans-serif; font-size: 0.95em; text-transform: uppercase; }

这是footer.html代码

<div id="footer-row1"> <div id="footer-bg"> <div id="footer" class="container_24"> <div class="copyright"> #COPYRIGHT#&COPY;{var name='copyright_year'} {var name='sitename'}. &nbsp;&nbsp;{var name='footer_menu'} </div> </div> </div> </div>

谢谢

I am creating a footer block for my website. I am not an expert with css. I am looking to create a block with padding on both left and right side.

Attached is the example of the footer block, I wish to create:

However, the footer block, that I created is spanning over the entire screen. Any idea what could be wrong ?

Here is my css code :

#footer-row1{ margin-top: 80px; padding: 1.2em 0; background: #000; bottom: 0; margin-right: -33px; font-family: "Fjalla One", Verdana, Geneva, sans-serif; font-size: 0.95em; text-transform: uppercase; }

Here is the footer.html code

<div id="footer-row1"> <div id="footer-bg"> <div id="footer" class="container_24"> <div class="copyright"> #COPYRIGHT#&COPY;{var name='copyright_year'} {var name='sitename'}. &nbsp;&nbsp;{var name='footer_menu'} </div> </div> </div> </div>

Thanks

最满意答案

检查这个FIDDLE

#footer-row1{ margin-top: 80px; padding: 1.2em 0; background: #000; bottom: 0; margin-right: -33px; font-family: "Fjalla One", Verdana, Geneva, sans-serif; font-size: 0.95em; text-transform: uppercase; } .copyright{ text-align: center; color: #FFF; }

check this FIDDLE

#footer-row1{ margin-top: 80px; padding: 1.2em 0; background: #000; bottom: 0; margin-right: -33px; font-family: "Fjalla One", Verdana, Geneva, sans-serif; font-size: 0.95em; text-transform: uppercase; } .copyright{ text-align: center; color: #FFF; }

更多推荐

本文发布于:2023-07-25 22:36:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1267204.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:创建一个   页脚块   css   Block   Footer

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!