Two elements align vertically

1

I want to put one under the other but it does not work

#tabla{
width:100px;
height:100px;
background-color:red;
}
<nav style="float:left">
  <ul class="nav nav-pills nav-stacked span2">
    <li><a href="#">Home</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</nav>
<div id="tabla" style="float:left"></div>
    
asked by hubman 21.07.2018 в 01:21
source

1 answer

2

If you remove the float: left it works:

#tabla{
width:100px;
height:100px;
background-color:red;
}
<nav>
  <ul class="nav nav-pills nav-stacked span2">
    <li><a href="#">Home</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</nav>
<div id="tabla" style="float:left"></div>
    
answered by 21.07.2018 / 01:26
source