0

I am trying to put the article tag within two vertical tags ([London, Paris, Tokyo] and [London2, Paris2, Tokyo2]).

I tried adding float:left in each of these elements, and it messed up the positioning.

I also tried reducing the width of the article column but it doesn't make the [London2...] nav to move up.

div.container {
    width: 90%;
    border: 2px solid red;
}
header,
footer {
    padding: 1em;
    color: white;
    background-color: black;
    clear: left;
    text-align: center;
}
nav {
    float: left;
    max-width: 60px;
    margin: 0;
    padding: 1em;
}
nav ul {
    list-style-type: none;
    padding: 0;
}
nav ul a {
    text-decoration: none;
}
#delete_bar {
    background-color: orange;
    height: 200px;
    width: 20%;
    /*float: left;*/
}
#cool {
    background-color: teal;
    height: 100px;
}
article {
    height: 400px;
    width: 40%;
    margin-left: 170px;
    border-left: 1px solid gray;
    padding: 1em;
    overflow: scroll;
    /*float: left;*/
}
<!DOCTYPE html>
<html>

<head>
    <link rel='stylesheet' href='style.css'>

</head>

<body>

    <div class="container">

        <header>
            <h1>City Gallery</h1>
        </header>

        <nav>
            <ul>
                <li><a href="#">London</a>
                </li>
                <li><a href="#">Paris</a>
                </li>
                <li><a href="#">Tokyo</a>
                </li>
            </ul>
        </nav>

        <article>
            <h1>London</h1>
            <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
            <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
            <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
            <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
            <p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
            <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
            <p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
        </article>

        <div id='delete_bar'>
            <ul>
                <li><a href="#">London2</a>
                </li>
                <li><a href="#">Paris2</a>
                </li>
                <li><a href="#">Tokyo2</a>
                </li>
            </ul>
        </div>


        <div id='cool'>Lower navigation</div>

        <footer>Copyright &copy; W3Schools.com</footer>

    </div>

</body>

</html>
KubiK888
  • 4,377
  • 14
  • 61
  • 115

0 Answers0