Forum Replies Created
-
AuthorPosts
-
RahMember
Thank you Brad, it's really strange now as when I inspect the element within Chrome. I can apply the style within the browser to
a.home-featured-button
As soon as I copy and paste this code into my stylesheet like so:
/* Home Featured Button --------------------------------------------- */ a.home-featured-button { background: rgba(255,255,255,0.8); padding: 14px 27px; font-weight: 500; margin-top: 20px; display: inline-block; margin-bottom: 0; } a.home-featured-button:hover { background: rgba(0,0,0,0.35); }
It doesn't apply the styles above...
I have also added the class for this custom button, to the original button style throughout the theme like so:
button, input[type="button"], input[type="reset"], input[type="submit"], .button, a.home-featured-button { background-color: #000; border: none; color: #fff; cursor: pointer; font-size: 16px; font-weight: 300; line-height: 1; padding: 20px 24px; width: auto; border-radius: 2px; }
I assumed the styles for the .home-featured-button would overwrite the ones applied the the default .button class as they do when in Chrome.
This button is driving me insane! Haha
RahMemberCan anyone tell me where I seem to be going wrong? 🙁
RahMemberHey!
I was also trying to achieve something similar, I wanted to add a button to a text widget. But for reasons unknown to me, I can not seem to style/target this custom button.
<div class="custom-button"><a href="http://example.com" class="button">Click This Button!</a></div>
/* Custom Button --------------------------------------------- */ .custom-button { background-color: rgba(255,255,255,0.5); border-style: none; }
Any advice? 🙂
RahMemberHey Brad!
Great tutorial, I tried using option 3. Here is my code following step 3:
<div class="home-featured-button"><a href="http://example.com" class="button">Get In Touch</a></div>
Also here's the CSS:
/* Home Featured Button --------------------------------------------- */ .home-featured-button { background-color: rgba(255,255,255,0.5); border-style: none; }
But, the button is not taking on the new styles added to the stylesheet. It just looks like all the other buttons throughout the site 🙁
Many Thanks,
Rachel -
AuthorPosts