html - Arrange DIVs in the right position -
i'm having huge problems trying arrage divs, found thing not simple seems, put div , inside div 2 , you're done. image bellow shows how want page structured: sur1. surf2: surfleft, surfright. surf3. surf4 . means line , , means divs should 1 next another. , can't center image vertical , horizontall middle on surfright surf 2 parent.
@font-face { font-family: font; src: url(montserrat-regular.ttf); } p.title1 { font-size: 2.5em; margin: 0; } p.title2 { font-size: 3em; } .i1 { height: 400px; float: right; display: block; margin-top: 150px; } div.surf1 { display: block; background-image: url("surf1.jpg"); background-position: center; background-size: cover; height: 600px; } div.surf2 { width: fit-content; position:absolute; background: #41c3ac; height: 600px; } div.surfleft { float:left; display: block; width: 45%; padding-top: 80px; height: 600px; background: #8c78b1; } div.surfright { float: right; background: #ff6b57; } div.surf3 { background: #ff6b57; height: 600px; } div.surf4 { background: #8c78b1; height: 600px; } div.text1 { padding-top: 100px; color: white; text-align:center; font-size: 2.5em; } div.button { text-align: center; font-size: 1.5em; margin: 0 auto; width: 15%; padding: 8px; border: 2px solid; border-color: #e7dd84; background-color: rgba(236,229,167,0.2); color: #e7dd84; transition: 0.35s; } div.button:hover { background-color: white; color: black; border-color: white; transition: 0.35s; } body { margin: 0; font-family: font; color: white; } <!doctype html> <html> <head> <title>welcome</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <div class="surf1"> <div class="text1"> <b>welcome smartlearning.com, <br>the place can <br>learn , practice english</b> </div> <br><br><br><br><br> <div class="button"> go site </div> </div> <div class="surf2"> <div class="surfleft"> <p class="title1">interractive games</p> <ul style="font-size: 1.5em"> <li>we have different types of games can play, testing abilities recognise objects, multiple choise exercices , putting test of spotting mistakes.</li> <li>those games designed learn , practice english combining fun hard-working.</li> </ul> </div> <div class="surfright"> <img src="console.png" alt="404 image not found" height="400px"> </div> </div> <div class="surf3"></div> <div class="surf4"></div> <body> </body> </html>
please note may use correct width values have fine edges in design.
div.surf1 { display: block; background-color: #cdcdcd; height: 100px; } div.surf2 { background: #41c3ac; height: 100px; } div.surfleft { float:left; display: block; width: 50%; height: 100px; background: #8c78b1; } div.surfright { float: right; width: 50% background: #ff6b57; } div.surf3 { background: #ff6b57; height: 100px; } div.surf4 { background: #8c78b1; height: 100px; } body { margin: 0; font-family: font; color: white; } <div class="surf1"> <div class="text1">surf 1</div> </div> <div class="surf2"> <div class="surfleft">surf left</div> <div class="surfright">surf right</div> </div> <div class="surf3">surf 3</div> <div class="surf4">surf 4</div> 
Comments
Post a Comment