如何在网站的页脚中添加右对齐的Facebook和Twitter按钮?

时间:2010-10-06 21:03:22

标签: html facebook twitter footer

我在我的电子商务网站上使用Volusion,并希望将Facebook和Twitter按钮/图标添加到我的网站的页脚(有点像页脚中的“cc-wiki”和“Peak Internet”徽标这个页面)。

以下是我的页脚的当前HTML代码。我添加了什么代码以保留版权和“Powered by Volusion”文本左对齐,并在同一行添加所需的按钮,但右对齐?

<div id="footer_bottom">
    <!--<div id="footer_right" class="right">-->

    <!--</div>-->
    <div id="copyright">
        <a href="/terms.asp">Copyright &copy; <script type="text/javascript">document.write((new Date()).getFullYear());</script>  &nbsp;Config_CompanyNameLegal&nbsp; All Rights Reserved.</a>

        <!-- ==========================================================================================
            VOLUSION LINK - BEGIN
        ===============================================================================================
        Customer has agreed per Volusion’s Terms of Service (http://www.volusion.com/agreement_monthtomonth.asp) to maintain a text hyperlink to "http://www.volusion.com" in the footer of the website. The link must be standard html, contain no javascript, and be approved by Volusion. Removing this link breaches the Volusion agreement.-->   

        <br><a style="color: #F0F0F0" href="http://www.volusion.com" title="Shopping Cart Software" target="_blank">Powered by Volusion</a>
    </div>
    <!-- ==========================================================================================
        VOLUSION LINK - END
    =========================================================================================== -->    
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

你的div上必须有float: leftfloat:right(这种效果,未经测试只能使用CSS)。

<div id="footer_bottom" style="display: block; width: 100%">
    <div id="powered" style="float: left">Powered by Volusion</div>

    <!--</div>-->
    <div id="copyright" style="float:right" ><a href="/terms.asp">Copyright &copy; <script type="text/javascript">document.write((new Date()).getFullYear());</script>  &nbsp;Config_CompanyNameLegal&nbsp; All Rights Reserved.</a>
     </div>
</div>

请记住,您应该拥有一个CSS(样式表),并将我放在style=""中的所有内容放入CSS中。

e.g。

/* CSS */
#powered {
   float: left;
}