Z
Z
zeni1agent2018-12-30 18:34:02
Bootstrap
zeni1agent, 2018-12-30 18:34:02

How to position a div to the right side of the parent?

i have this code

<style>
.scene {
  width: 1000px ; 
   height: 600px;
  background-color: #6c6c77;
  display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #080808 ;
}

.button_scene {	  
    background: #121213bd;
    color: #ffffffe6 ;
   height: 100px;
   width: 100px ; 
   border-radius: 50px 50px 50px 50px;
   border: 0 ;
}
#menii {
position: absolute ;	
}

</style>


<div class="scene">
<div id="menii"></div>
<input type="button" id="B1" value="Start" name="button1" class="button_scene" onclick="A1(); style.display='none'"  ><br/>
<div id="program"></div>

I need the button_scene and program button to be located in the center of the scene
, the button_scene button disappears when pressed,
and menii is on the right edge of the parent div scene without moving the program

Answer the question

In order to leave comments, you need to log in

4 answer(s)
O
Oleg, 2016-03-18
@werty1001

<div class="row">
  <div class="col-sm-12 col-md-8 col-md-offset-2 col-lg-6"></div>
</div>

Y
Yakov Vylegzhanin, 2016-03-18
@vylegzhanin

What's with the bootstrap? Found a panacea for everything, damn it.
CSS for the block you want to center:
margin: 0 auto;

H
HelenaS, 2016-03-18
@HelenaS

class center-block

M
Mark, 2019-01-03
@marki1404

float:right;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question