This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asideContainer.on( 'click', '#load-asides', function(e) { | |
e.preventDefault(); | |
loadAsides(); | |
} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load asides | |
var asideLoader = $('#load-asides'); | |
var asideContainer = $('#sidebar'); | |
var loadAsides = function () { | |
var href = asideLoader.attr('href'); | |
asideContainer.load( href + ' #sidebar-content'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
// check the window size when page loads | |
checkWidth(); | |
// check on resize | |
$(window).resize(function() { | |
checkWidth(); | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkWidth () { | |
if ($(window).width() > 1400) { | |
$('body').attr('class','superwide'); | |
$('#title').text('Wide ('+$(window).width()+')'); | |
} | |
else if ($(window).width() > 1100) { | |
$('body').attr('class','wide'); | |
$('#title').text('Wide ('+$(window).width()+')'); | |
} | |
else if ($(window).width() > 800) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#wrapper { margin: 0 auto; } | |
#header {overflow: hidden;} | |
#container,#content,#primary,#secondary,#tertiary | |
{float:left;} | |
#footer {clear:left;width:100%;} | |
/* Wide ( over 1100px ) */ | |
.wide #container {width:60%;} | |
.wide #content {width:66%;} | |
.wide #primary {width:34%;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body class="normal> | |
<div id="wrapper"> | |
<div id="header"> ... </div> | |
<div id="main"> | |
<div id="container"> | |
<div id="content"> ... </div> | |
<div id="primary"> ... </div> | |
</div> | |
<div id="secondary"> ... </div> | |
<div id="tertiary"> ... </div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { margin: 0; padding: 0; font-size: 100%; } | |
body { | |
font-family: "Helvetica Neue", Arial, sans-serif; | |
line-height: 1.4; | |
padding: 1.5em; | |
} | |
/* Vanhemmat selaimet eivät ymmärrä uusia HTML5-elementtejä, | |
joten ne pitää muistaa erikseen määritellä block- tai inline-tyyppisiksi. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Asetetaan kaikkien elementtien marginaalit perustilaan, | |
nopea tapa varmistaa että millään elementillä ei ole valmiiksi marginaalia. | |
*/ | |
* { margin: 0; padding: 0} | |
/* Perustyylit taustalle ja koko asiakirjalle, näitä kannattaa olla lisää! | |
mm. listat, lomakkeet, em, strong, yms yms... | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="fi"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="author" content="Tekijän Nimi"> | |
<meta name="description" content="Sivun kuvaus: Tämä on ensimmäinen HTML-harjoitus."> | |
<title>Kaksisarakkeinen sivu</title> | |
<link href="fluid.css" rel="stylesheet"> <!-- Viittaus tyylitiedostoon --> | |
</head> |