Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Custom Heading Not Working CSS

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #46108

    Hello.

    I have put a class in my h2 but still showing the heading background. I only want the background to show up in when do not have h2.

    I only want to be able to show the bottom border in the heading that has h2.

    the two samples are in my code pen
    http://codepen.io/mwbcomputers/pen/abruq

    #141647
    Paulie_D
    Member

    Wait…what?

    Which background, when?

    The background of `

    ` will always show if there is anything inside that div even just padding. Setting `background:none` on the h2 will not affect the background of `

    `.

    If you don’t want a background on the `

    ` don’t put one on it.
    #141648
    Paulie_D
    Member

    An `h2` is a block level element; there really isn’t any need to wrap in in a div **unless** you want to put some sort of special styling on the **div** itself.

    If you want a bottom border only on the `h2′ then just add that.

    http://codepen.io/Paulie-D/pen/wbGBu

    #141649

    The way I done is way open cart is

    #141650
    Paulie_D
    Member

    So there is always a `

    ` and there may be an ` h2` in it or there might not be?

    But if there is an `h2` it has to have a bottom border BUT you don’t want the wrapping `

    `to have the background that Open Cart has assigned.

    Is that right?

    #141651

    I am now just modifying it will let you know how I go.

    #141666

    @Paulie_D

    I did it your way using div just about there few things have to fix but all good.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CSS’ is closed to new topics and replies.