Predmet:CSS problemi
Imam problem kada je css file, kada stavim u index page radi, a kao posebni file onda ne radi. Kako to rijesiti?
ovo radi:
index.html
PreuzmiIzvorni kôd (HTML):<!DOCTYPE html>
html, body {
height: 100%;
margin: 0;
}
.content {
min-height: 100%;
}
.content-inside {
padding: 20px;
padding-bottom: 50px;
}
.footer {
height: 50px;
margin-top: -50px;
}
body {
font: 16px Sans-Serif;
}
h1 {
margin: 0 0 20px 0;
}
p {
margin: 20px 0 0 0;
}
footer {
background: #42A5F5;
color: white;
line-height: 50px;
padding: 0 20px;
}
<footer class="footer">
FOOTER
</footer>
ovo ne radi:
index.html
PreuzmiIzvorni kôd (HTML):<!DOCTYPE html>
<link rel="stylesheet" href="style.css">
<footer class="footer">
FOOTER
</footer>
style.css
PreuzmiIzvorni kôd (CSS):html, body {
height: 100%;
margin: 0;
}
.content {
min-height: 100%;
}
.content-inside {
padding: 20px;
padding-bottom: 50px;
}
.footer {
height: 50px;
margin-top: -50px;
}
body {
font: 16px Sans-Serif;
}
h1 {
margin: 0 0 20px 0;
}
p {
margin: 20px 0 0 0;
}
footer {
background: #42A5F5;
color: white;
line-height: 50px;
padding: 0 20px;
}
zivot je moja domovina.