Centering a custom made button, button transitions
dipanjan94
Registered Users Posts: 83 Big grins
- In this page https://www.dipanjanpal.com/Awards I have added a button at the end of it. However, due to some clumsy coding, I was not able to properly center it for both mobile and desktop. Can anyone please help me with it?
- Also, is there anyway to include a fade-in effect for the button when someone hovers their mouse on top of it? Like slowly fading in from grey to black in like 0.2 sec?
- This is about my footer - I have added my email in my footer. However, instead of labeling it as EMAIL, I think a small mail icon would look very neat. Can this be done using html/css?
Tagged:
0
Comments
You have this:
Replace it with this:
For your
button a
code, removetransition-duration: 0.002s;
and usetransition: all .2s ease-in-out;
.DO NOT USE
<center> </center>
to center content. It will not work in HTML5 (what SmugMug uses now).Remove this:
Use this in the HTML section:
CSS:
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thank you so much Mike! For the one where you added the Mail fonticon, I think it is not vertically centered with the email id line !
Could you tell me what do I need to do in order to center this vertically?
Add this:
.sm-fonticon-Mail::before {vertical-align: text-bottom;}
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
It looks almost there. May be I'd shift it up by 1px or 2px. Is there anyway to shift the icon pixel by pixel, so that I can get it exactly where I desire?
Try adding
line-height: 20px;
:Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thank you so much!
line-height: 23px;
did it for me!