Forums

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

Home Forums CSS CSS hover hack

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #237951
    PHREd
    Participant

    I have a problem when hovering over buttons as when i have a button with two words the button resizes and a padding is added to the bottom. The entire html is below. The Hover again expands significantly on hover versus the again button’s. Is there a way to discard the padding even when the button has two words ?
    thank you.

    http://codepen.io/PHREDSolutions/pen/ZQVPxX

    #237952
    Paulie_D
    Member

    A Demo is infinitely preferred to a codedump…especially CSS that does not seem to match the provided HTML.

    #237953
    PHREd
    Participant

    Paulie,

    Above is an example

    #237955
    Paulie_D
    Member

    You mean style based on the content…nope, CSS can’t do that.

    #237956
    bearhead
    Participant

    I’m not quite sure what you’re asking for, but if you don’t want the size of the button to change, you can add white-space: nowrap; to .button span

    That will prevent the button text from wrapping on to two lines and making the button taller. Be aware that the text can go outside of the button if it is too long.

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