Open In App

How can I stack two arrow images (upvote/downvote) on top of eachother using CSS ?

CSS (Cascading Style Sheets) is a stylesheet language used to design a webpage to make it attractive. The reason for using this is to simplify the process of making web pages presentable. It allows you to apply styles on web pages. More importantly, it enables you to do this independent of the HTML that makes up each web page.

In this article, we will learn about how can I stack two arrow images (upvote/downvote) on top of each other using CSS.



Properties used:

Example: In this article, we will see how we can stack two arrow images (upvote/downvote).






<!DOCTYPE html>
<html>
  
<head>
    <title>
        stack two arrow images (upvote/downvote) on top of eachother
    </title>
    <style>
          
        img
        {
            width:150px;
            margin-left:20px;
        }
        .vote
        {
            float: left;
            clear: left;
        }
  
        .gfg img
        {
            display: block;
            float: none; 
            clear: both;
        }
    </style>
</head>
  
<body>
    <h1 style="color:green">GeeksforGeeks</h1>
  
    <div class="gfg">
        <img src=
        <img src=
    </div>
</body>
</html>

Output:

 


Article Tags :