Piszę właśnie swoją pierwszą stronkę w HTML/CSS. Mam problem ponieważ nie mogę ułożyć elementów na stronie: stopka wyświetla się pośrodku strony zamiast po ostatnim newsie. Gdy próbuję naprawić to najczęściej stopa wskakuje pod newsy ale kolumna druga wyswietla sie pod ostatnim newsem a nie u gory. Czy ktos moglby mi podpowiedziec, co robie nie tak?
index.html:
<!DOCTYPE html>
<meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="style.css" /> <link type="text/css" rel="stylesheet" href="http://fast.fonts.com/cssapi/7437551d-ab4b-4ece-bc20-f8956f5b84cd.css"/> <a href="#" class="toplink">Home
</a>|
<a href="#" class="toplink">O mnie
</a>|
<a href="#" class="toplink">Projekty
</a>|
<a href="#" class="toplink">Kontakt
</a> <div class="maincontainer"> <div id="logo_left">SITENAME
</div> <div id="logo_right">SLOGAN
<div id="socialpanel"> Znajdziesz mnie:
<img src='images/facebook.png' alt="Odwiedź mnie na Facebooku" /> <img src='images/twitter.png' alt="Śledź mnie na Twitterze" /> <div id="loginpanel">Zaloguj:
</div> <div id="newsletter">Newsletter:
</div>
<div class="maincontainer"> <a href="#" class="footlink">Home
</a>|
<a href="#" class="footlink">O mnie
</a>|
<a href="#" class="footlink">Projekty
</a>|
<a href="#" class="footlink">Kontakt
</a> <div id="footer_right">2000-2014
© SITENAME
</div>
style.css
/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/*
Created on : 2014-10-21, 10:29:26
Author : krzysztof
*/
body {
background-color: #e0e0e0;
//background-image: url(images/ironpatern.png);
font-family: "HelveticaNeueW02-Thin";
}
img {
alignment-adjust: right;
}
#container {
width:100%;
}
#nav {
background-color: white;
width: 100%;
padding: 15px 0 5px 0;
}
#nav a:hover{
color: #0080ff;
text-decoration: none;
}
.toplink {
color: grey;
padding: 0px 15px 0px 15px;
text-decoration: none;
}
#logobar {
background-color: #0080ff;
margin: 10px 0px 10px 0px;
padding: 0px 50px 0px 0px;
height: 100px;
line-height: 100px;
text-align: right;
vertical-align: middle;
font-size: 12;
}
.maincontainer {
width: 900px;
margin-left: auto;
margin-right: auto;
}
#logo_left {
width: 35%;
text-align: right;
margin-right: 10px;
color: #ffffff;
font-size: 24;
font-weight: bold;
float: left;
}
#logo_center {
width: 1%;
border: solid 1px blue;
margin: 25px 0px 25px 0px;
padding: 49px 0px 0px 0px;
background-color: blue;
color: blue;
float: left;
}
#logo_right {
width: 55%;
font-size: 14;
text-align: left;
margin-left: 10px;
letter-spacing: 2mm;
float: left;
}
#main {
width: 900px;
margin-left: auto;
margin-right: auto;
float: inherit;
}
#col1 {
width: 570px;
height: 500px;
float: left;
}
#col2 {
background-color: #ffffff;
width: 230px;
padding: 15px 15px 0px 15px;
margin: 10px auto;
float: right;
text-align: center;
}
#socialpanel {
background-color: #e0e0e0;
color: #0080ff;
margin-bottom: 15px;
padding: 15px 15px 15px 15px;
text-transform: uppercase;
}
#loginpanel {
background-color: #000000;
color: #ffffff;
margin-bottom: 15px;
padding: 15px 15px 15px 15px;
text-transform: uppercase;
}
#newsletter {
background-color: blue;
color: #ffffff;
margin-bottom: 15px;
padding: 15px 15px 15px 15px;
font-weight: bold;
}
.news {
background-color: #ffffff;
width: 600px;
height: 150px;
margin: 10px auto;
padding: 15px 15px 15px 15px;
float: left;
}
#footer {
width: 100%;
background-color: #0080ff;
color: #ffffff;
margin: 10px 0px 10px 0px;
padding: 15px 0px 15px 0px;
float: right;
}
#footer_left {
text-align: left;
}
#footer_right {
text-align: right;
font-size: 12px;
padding-right: 15px;
}
#footer a:hover{
color: #e0e0e0;
text-decoration: none;
}
.footlink {
color: #ffffff;
padding: 0px 15px 0px 15px;
text-decoration: none;
}