Astha Srivastava
Astha Srivastava

Reputation: 149

Materialize CSS icon positioning in floating button

I'm trying to position an icon in the center of a floating button using materialize CSS. The icon is coming in the center, but its vertical position is not centered. Instead, it is placed at the top. Can someone tell how to bring it to the exact center of the button?

Upvotes: 0

Views: 937

Answers (1)

Deepak Verma
Deepak Verma

Reputation: 617

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
 
     <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">
	  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>

<body>
	<div class="container"> 
	<a class="btn-floating pulse btn-large waves-effect waves-light "><i class="material-icons">g_translate</i></a>
    </div>
       
</body>

</html>

Here is what you need. hope it will help!!

Upvotes: 1

Related Questions