Forums

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

Home Forums CSS Buttons With Gradient CSS

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

    I have made buttons in illustrator with small gradient at top. ass seen in this image http://s16.postimg.org/931t4vqn9/My_Buttons.png

    Also have made a sample HTML Code with out gradient at top white like image link

    http://codepen.io/mwbcomputers/pen/BClmw

    Also have alined text in center but still looks out to me think it might be something to do with padding

    #131936
    Paulie_D
    Member

    >Also have alined text in center but still looks out to me think it might be something to do with padding

    Well…yes, you have this:

    padding: 0px 0px 0px 4px;

    However, what does that have to do with gradients?

    #131938

    @Paulie_D change it before to the padding: 0px 0px 0px 4px; it worked new it was something like that but there is know way can remove or edit previous comment to change it

    Now just trying to work out how to get my buttons with a little white gradient on top non of the searches I have been doing have been not good.

    #131940
    CrocoDillon
    Participant

    .links a {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5) 1px, rgba(0, 0, 0, 0) 1px, rgba(0, 0, 0, 0.5));
    }

    That gives the little white, and a black overlay to create the shadow. If you want better shadow you probably have to set it per class. Oh and change the background properties per class to background-color properties, else they overwrite the gradient.

    Plus vendor prefixes as: http://css3please.com/ (would have to look up how old webkit syntax works with gradient stops though)

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