0

I need help to position my hamburger menu. I want it to the right corner with margin-top and padding-right as the CSS below.

I don't work with float, what do I need to use? :)

Please help a student.

.header_container { 
   width: 100%
 }


.hamburger_menu {
    margin-top: 37px;
 /*  padding-right: 30px;  */
}

 
 .header_logo {
   background-color: lightgray;
   width: 280px;
   text-align: center;
   margin-top:70px;
   margin-bottom: 100px;
   margin-left: auto;
   margin-right: auto; 
 }

.header_text {
   text-align: center;
   margin-top:26px;
   margin-bottom:46px;
}
<div class="header_container">

 <div class="hamburger_menu"> 
      Hamburger menu
 </div> 
  
 <div class="header_logo">
      LOGO
 </div>
  
 <div class="header_text">
      Text
 </div>
     
</div>
Peace
  • 616
  • 2
  • 8
  • 24

2 Answers2

1

To resolve the problem, instead of float:left, use:

.hamburger_menu{float:right;}
Gurmatpal
  • 134
  • 8
0

Use text-align:right; for the menu.

GuyML
  • 257
  • 2
  • 10