dsjj15012 2013-07-31 02:12
浏览 41
已采纳

h使用opencart中的css标记更改

Im trying to implement a more accurate h tag structure on my opencart site for seo purposes. For those that are unfamiliar with the html in opencart, most pages are split with php calls being made to seperate header, main body and footer files. I want to have a h1 tag that is slightly different on the main page to the product page by writing internal css to change the font size to something slightly smaller.

I therefore added the code (below) to the top of the products page which seems to work but leaves a massive white space at the bottom of the page below the footer. Example at this link: http://www.imbued.co.uk/sleep/aborro-bed

How do i implement this using css correctly?

<style>
h1 {
font-size:2em !important;
margin:0 0 20px !important
}
</style>
  • 写回答

1条回答 默认 最新

  • dongmo6937 2013-07-31 02:25
    关注

    Try this:

    "h1" on main page:

    #content-home h1 {
        font-size: 2em;
        color: red;
    }
    

    "h1" on product page:

    .product-info h1 {
        font-size: 1em;
        color: green;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP