Od 2 dni męczę się z problemem w HTML5.
Mianowicie stworzyłem małą stronkę w której obok siebie są po 3 kwadraty na rząd.
Problem w tym, że jeśli wypełnię jakikolwiek kwadrat, to on w tedy przesuwa się w dół.
Co jest przyczyną?
Kod HTML:
<!DOCTYPE html> <html lang="pl"> <meta charset="utf-8"> <meta name="Author" content=""> <link rel="Stylesheet" href="css/style.css"> <body> <section class="wrapper"> <section id="data-wrapper" class="data-wrapper"> <section class="article-wrapper" id="glowna"> <article class="article"> </article> </section> <section class="article-wrapper" id="cennik"> <article class="article">test </article> </section> <section class="article-wrapper"> <article class="article"> </article> </section> </section> <section class="data-wrapper"> <section class="article-wrapper"> <article class="article"></article> </section> <section class="article-wrapper"> <article class="article"></article> </section> <section class="article-wrapper"> <article class="article"><time></time></article> </section> </section> <section class="data-wrapper"> <section class="article-wrapper"> <article class="article"></article> </section> <section class="article-wrapper"> <article class="article"></article> </section> <section class="article-wrapper" id="kontakt"> <article class="article"><time></time></article> </section> </section> <footer></footer> </body> </div> </html>
i CSS:
.top { position: fixed; margin-left: 70px; margin-top: -8px; } .top a { font-size: 30px; color: silver; font-family: "Impact", Verdana, sans-serif; text-decoration: none; margin-right: 20px; } .top a:hover { font-size: 30px; color: gray; font-family: "Impact", Verdana, sans-serif; text-decoration: none; margin-right: 20px; } html { margin: 0px; } .data-wrapper { width: 3000px; height: 100%; } .article-wrapper { width: 880px; height: 500px; margin-left: 40px; margin-top: 40px; /*border: solid 1px black;*/ display:inline-block; } .article { width: 860px; height: 480px; padding: 10px; } footer { height: 100px; width: 100%; }