How does spotify center their middle play svg?

How do they center it?

What is used?

It uses button instead of a div, and so I think that has something to do with it.


My Code:

I’m just guessing and would first of all remove the hard-coded statement ***margin-left: 180px;***.

I would then treat the button similar to text by using text-align: center then look to how to set the vertical position middle.

I managed to make a replication here.

Is the new version doing everything you want it to do?

Here’s a full page version which I far prefer because it is easier to validate :slight_smile:

Error : The character encoding was not declared. Proceeding using windows-1252 .