How to position the icon in the right corner of the screen

0

I need to leave the code icon below in the upper right corner of the screen, but I do not know how to do it:

<div>
    <button type="button" align="rigth" class="" id="exampleIconDropdown1" data-toggle="dropdown" aria-expanded="false">
        <i class="icon wb-more-vertical" aria-hidden="true"></i>
    </button>
    <div class="dropdown-menu" aria-labelledby="exampleIconDropdown1" role="menu">
        <a celass="dropdown-item" href="javascript:void(0)" role="menuitem">Sobre</a>
    </div>
<div>

Can anyone help me?

    
asked by anonymous 09.10.2017 / 16:38

3 answers

0

Try to insert into the DIV or the tag that is using the following statement.

<div align="right"> </div>
    
09.10.2017 / 16:45
0

This way you can put it anywhere you want by acting on margin-top and margin-right

#topRight {
float: right;
margin-top: 20px;
margin-right: 20px;
}
<div id="topRight">
    <button type="button" align="rigth" class="" id="exampleIconDropdown1" data-toggle="dropdown" aria-expanded="false">
        <i class="icon wb-more-vertical" aria-hidden="true"></i>
    </button>
    <div class="dropdown-menu" aria-labelledby="exampleIconDropdown1" role="menu">
        <a celass="dropdown-item" href="javascript:void(0)" role="menuitem">Sobre</a>
    </div>
</div>

For fixed position in scrool

    #topRight {
    position:fixed;
    top: 20px;
    right: 20px;
    }
<div id="topRight">
        <button type="button" align="rigth" class="" id="exampleIconDropdown1" data-toggle="dropdown" aria-expanded="false">
            <i class="icon wb-more-vertical" aria-hidden="true"></i>
        </button>
        <div class="dropdown-menu" aria-labelledby="exampleIconDropdown1" role="menu">
            <a celass="dropdown-item" href="javascript:void(0)" role="menuitem">Sobre</a>
        </div>
</div>
    
09.10.2017 / 18:08
0

There are several ways depending on what you want:

  • If you want <div> to always be pasted even when the user scrolls, use the main div <div style="position:fixed;top:0;right:0;">
  • If you want it to stay on top of other div but do not follow scroll , put <div style="position:absolute;top:0;right:0;">

  • If you do not want to overlap any, just add <div style="float:right">

09.10.2017 / 17:23