Oldestman57
Posts: 0
Joined: Thu Mar 31, 2016 9:15 pm

How can you align the text in the center of a round button and still keep the button round?

This is my css:
.round-button-text { height: 100px !important;
background-color: #3498db !important;
width: 100px !important;
border-radius: 80px !important;
border: 5px solid #bee0f3 !important ;
box-shadow: 10px 10px 5px #888888;
font-style:normal;
font-size: 10px;
text-align: center;
white-space: normal;
} Here is the current condition. I have tried padding and floating, button gets out of round.
Image

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How can you align the text in the center of a round button and still keep the button round?

Hello,

Please see the full example how to center components with CSS here: https://css-tricks.com/centering-css-...

Return to “Issues”