Jump to content

Archived

This topic is now archived and is closed to further replies.

Keith Vaugh

Custom button

Recommended Posts

Keith Vaugh

Hi All

I am trying to create a custom button to be targeted with a shortcode. Its a very simple in its current form, however I can't figure out how to add a hover affect. The CSS I have so far is:

.btn-magva {
  background: #5d2248;  
  border: 1px solid #5d2248;
}
a.btn-magva {
color: #fff;
}

When I hover over the button I'd like to background color to fade (maybe with a transparency).

Thanks in advance

 

Share this post


Link to post
Share on other sites
Danny

Hi Keith,

You will want to use the :hover pseudo class and apply your styling there. If you want to have the button fade you will want to using the transition property. See here - http://stackoverflow.com/questions/21145621/css-transition-opacity-fade-background


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Keith Vaugh

Think I may have figured it out:

.btn-magva {
  background: #5d2248;  
  border: 1px solid #5d2248;
  padding: 2px 10px;
  font-size: 12.9px;
  -webkit-border-radius: 1px;
  -moz-border-radius: 1px;
  border-radius: 1px;
  display: inline-block;
  margin-bottom: 0; 
  line-height: 28px;
  text-align: center;
  vertical-align: middle;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 500;
  font-family: "Antic Slab","Helvetica Neue","Helvetica",Arial,serif;
  text-shadow: none;
  margin-top: 2px;
}
a.btn-magva {
color: #fff;
}
a.btn-magva:hover {
background: rgba(93,34,72,0.8);
border: 1px solid rgba(93,34,72,0.8);
color: #fff;
}

 

Share this post


Link to post
Share on other sites
Danny

Awesome.

Thanks for informing us the issue has been resolved and for sharing the code.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • Lisa Haran
      By Lisa Haran+
      Hi 
      I have a map here http://www.iloveoffset.com/maps/
      I want to add several pointer locations to the map, but when I do they do not appear.
      On this map there are 2 pointer locations and as you can there is only one visible.
      Earlier today I added 7 and could only see 4 so there is something odd going on.
      My theme is up to date
    • clj182
      By clj182+
      Hello,
      I've been having trouble unlocking the template section for past couple of weeks. When I try clicking nothing happens. 
      I've deleted my custom css and removed plugins. Im down to having only the following plugins:
      Akismet
      Contact Form 7
      DMS Professional Tools
      Pagelines Updater
      WooCommerce
      It was working fine before i have no idea what's going on with it.
    • flourishdesignstudio
      By flourishdesignstudio+
      My DMS 2 site http://www.heart-stone.com/ will not save any new custom css... I can still edit templates and publish those but any custom css that I enter never saves.
      All WP files, themes, and plugins are up to date. 
      Any thought about what might be causing this?
    • flourishdesignstudio
      By flourishdesignstudio+
      Is there a way to edit the custom CSS via FTP? I know I can edit the custom code in the Chrome editor but is there a file path I can use to find and edit the CSS directly from our FTP?
      Thanks in advance for the help!
    • nizami
      By nizami+
      Using navbar section with correctly configured WP menu to display main navigation at https://elenaangel.com. 
      All fine in desktop viewport. Menu displays twice in hamburger mode. How to fix this please? 

×