jeudi 23 juin 2016

float:left in a div not working as expected

I can't float my second div. I used 70% from my website for my posts and I wanted to use 30% to display a little text or something. So i created a div and from what I know, I have to use "float: left" in order to let that div to go to the right place, under the banner. I will post some pictures to let you know what I want. I want that red div to go there : There is my codePen <body> <!-- the header of the website --> <div class="header"> <div class="logo"><img src="https://s32.postimg.org/npddlgddx/logo.png"></div> <div class="header-text"> <!-- uncomment this later <h1>The Witcher</h1> <h2>The Wild hunt</h2> --> </div> <div class="header-menu"> <ul> <!-- header list --> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact</a></li> </ul> </div> </div> <!-- left content --> <div class="left-content"> <div class="posts"> <h1> Blood and wine DLC </h1> <!-- post images --> <img src="https://s31.postimg.org/yvl2ismcr/photo1.png" class="img1" /> <h1 style="margin-top: 55px"> Expansion Pass </h1> <img src="https://s31.postimg.org/lg5ef4et7/photo2.jpg" class="img1" /> </div> </div> <!-- right content --> <div class="right-content"></div> </body> </html> Can you tell me what's wrong? Also, could you tell me if the code looks nice or something?

Aucun commentaire:

Enregistrer un commentaire