wilded
8/13/2018 - 10:09 AM

Centered Div With an Image and Text next to each other

Centered Div With an Image and Text next to each other

<!DOCTYPE html>
<html>
<head>
<style>
.container {
    white-space: nowrap;
    text-align: center;   
}
.box {
    display: inline-block;
    width: 100px;
    vertical-align: middle;
}
</style>
</head>
<body>

<div class = "container">
    <img src = "img.png" class = "box"/>
    <div class = "box">Text</div>
  
</div>

</body>
</html>