html - Keeping 3 Floating Divs Center Stacked -


i have 3 divs inside of body, , need them stay centered @ times, without overlapping.

i post link page being hosted locally testing purposes.

body {  background-color: #c8dbdd;  background-image: url("http://www.splashpage.dev/wpcontent/uploads/2016/01/splashbackground.jpg");  background-position: center center;   display:inline-block;  }    #title {  left: 50%;  top: 50%;  /* bring own prefixes */  transform: translate(-50%, -50%);  margin-top: 80px;  margin-bottom: 20px;  display:block;  position:absolute;  display:inline-block;  }    .carousel {  left: 50%;  top: 50%;  /* bring own prefixes */  transform: translate(-50%, -50%);  height: 210px;  width: 950px;  background-color: rgba(255, 255, 255, 0.24);  position:fixed;  padding: 10px;  outline: #fff solid thin;  display:table;  clear:both;  display:inline-block;  }    .text {  font-family:'ubuntu', sans-serif;  color: #ffffff;  font-size: 12px;  text-align:center;   margin-bottom: 3px;  line-height: 25px;  }    .bottom {  font-family:'ubuntu', sans-serif;  position:fixed;  bottom:20px;  width:100%;  text-align:center;  color: #fff;  font-size:12px;  letter-spacing: 5px;  }    {  color: #fff;  text-decoration: none;  }
<body>      <div id="title">          <div style="text-align: center"></div>      </div>       <div class="carousel" id="carousel">          <div class="text" id="text"><font size="4px"></div>      </div>      <div id="bottom">          <div class="bottom" style="text-align: center">             <a href="http://www.splashpage.dev/">the destinations</a>             <a href="http://www.splashpage.dev/mission-statement/">the mission</a>              <a href="http://www.splashpage.dev/contact-us">contact</a>              <a href="http://www.splashpage.dev/careers/">careers</a>           </div>      </div>  </body>

i have tried kinds of position, float, clear, , margin combinations , can them centered can not keep them overlapping.

try following css code. display:table; line commented , height of .carousel increased height:442px; , hyperlink text colour changed white background black , doesn't appear.

@import url(//fonts.googleapis.com/css?family=ubuntu:300,400,500,700);  body {     background-color: #000;     background-image: url("http://www.splashpage.dev/wp-content/uploads/2016/01/splashbackground.jpg");     background-position: center center;  }  #title {     //float: center;     margin-top: 80px; }  .carousel {     margin: 0 auto;     height: 442px;     width: 950px;     background-color: rgba(255, 255, 255, 0.24); //  position:relative;     padding: 10px;     outline: #fff solid thin;     //display: table; }  .text {     font-family:'ubuntu', sans-serif;     color: #000;     font-size: 12px;     text-align:center;      margin-bottom: 3px;     line-height: 25px; }  .bottom {     font-family:'ubuntu', sans-serif; //  position:fixed;     bottom:20px;     width:100%;     text-align:center;     color: white;     font-size:12px;     letter-spacing: 5px; }  {     color: white;     text-decoration: none; } 

Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -