简体   繁体   中英

Place Element on Top Left Corner of Page

I'm using materialize css in my web application and I'm trying to make use of the Click Only Fab. The problem is that this always ends up on the bottom right corner of my page, when I want it on the top left.

<div class="fixed-action-btn horizontal click-to-toggle" id="menuBtn">
      <a class="btn-floating btn-large red">
          <i class="material-icons">menu</i>
      </a>
      <ul>
          <li><a class="btn-floating red"><i class="material-icons">insert_chart</i></a></li>
          <li><a class="btn-floating yellow darken-1"><i class="material-icons">format_quote</i></a></li>
          <li><a class="btn-floating green"><i class="material-icons">publish</i></a></li>
          <li><a class="btn-floating blue"><i class="material-icons">attach_file</i></a></li>
      </ul>
  </div>

I tried everything including floating and aligning and nothing has worked. How can I get this on the top left corner of my page? So I can use it as a menu button.

Can't you make a custom css class with

position:absolute;
top:0;
right:0;

? Alternatively fixed instead of absolute if you want it in the corner of the display, not page. I would comment but bloody 50 rep required, will delete this answer if it turns out to be very wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM