Streaming live at 10am (PST)

Center button in div


#1

Hello All,

I'm hoping someone can help me. In my page in the second section, there is a column layout that has a div in the first column. Inside the div is a text block and a button. The div's class is centered which should center the button but it doesn't. I also tried the center attribute in the position pane and it does nothing. Can someone help?

https://webflow.com/design/canalalarmdevices?preview=8db6b6b4a108aa7ec50b0d7e0a72ad74


#2

Select float to none and it will work smile


#3

Thank you Bartosz!! I knew it was something simple.


#4

@DFink, off topic, but that's a really nice looking site! I really like the colors, the icons, and the way you're using the photo at the top.


#5

Thanks! I think its coming along nicely and my client agrees smile


#6

I am having the exact same problem - a button which will not center, it floats left.

*I have set float to none and mimicked all the setting on a different webflow site which has a centered button with no results.


#7

Try putting a div inside. Then make the div text align center. Then put the button inside of the div. Tell me if this solves the problem. :wink:


#8

Thank you Vladimir!

This definitly helped, however, for some reason I am still experiencing a odd issue. The button seems scrunch up on a smaller screen size.

When I am inside the designer everything looks good, but when I look at it live it shows up.


#9

@VladimirVitaliyevich Here is a link to a video which show the button going from normal to squeezed. I am lost as to why this is happening.


#10

@uberwilso Can you please provide a public share link so I can take a closer look? Thanks! :wink:

https://help.webflow.com/article/how-do-i-share-my-sites-read-only-link


#11

sure thing, thank you for the help!

https://preview.webflow.com/preview/salesclone?preview=05e0588d0465c5e266f1ec969b7bc015


#12

Try doing "Remove this style". You have a lot of unnecessary elements that are doing nothing.

Tell me if it helps. :wink:


#13

Fixed! thank you very much.

Is there some way to award you points or something?


#14

Haha... If only :blush::grinning:.... No, if you would like you can like my post as well as mark it as the solution for the rest of the forum to know that your problem has been resolved.

Glad I could help. :wink:

Have a great day! :smile::+1:


#15