Www-sivut
Av-Heltech (11C) 03.12.2012- 15.01.2013
Taittotutorial
- avaa dreamweaver
- sivuston määrittely: (luodaan juurikansio)
- site valikko > new site
- kerro dw:lle sivuston nimi, juurikansion sijainti
- paina Save
- luodaan uusi html sivu
- file > new
- blank page, html, layout none, DocType html5
- tallenna sivu nimellä index.html
- preferenssit: new document > default document type html5
- koodit "tyhjälllä" sivulla:
- <!DOCTYPE HTML>: dokumenttityyppi (html4, html5, xhml )
- html tägi: käärii koko sivun
- head-tägi: metatietoa sivusta
- charset-määre: merkistökoodaus
- title elementti
- body elementti: nettisivun näkyvä sisältö
- p: paragraph: tekstikappale elementti
- taitto:
- tallenna leiskaesim01a.jpg tiedosto samaan kansioon kuin index.html
- paina properties paneelissa Page Properties > Tracing Image > Browse > hae tiedosto taustakuvaksi
- lisätään 4 div tägiä
- insert > Layout > div tag (anna class määreeksi "wrapper"
- index.html nyt: index.html
- css styles paneeli:
- Selector type : Compound
- Selector name: .wrapper
- new stylesheet file
- luo uusi kansio "css"
- tallenna css tiedosto nimellä tyyli01.css
- anna Bordet caterialle arvot: style: solid, width: thin, background: #999
- nyt tiedosto näytää tältä index02
- lisätään taittokoodit:
- tyylisääntöihin:
- body {
margin:0;
padding:0;
font-size: 100%;
}
.wrapper {
border: thin solid #999;
margin-left:12px;
width:816px;
}
#header {
font-size:2em;
border:2px solid #959;
height:120px;
}
- tyylisääntöihin:
- näidenä jälkeen tiedosto index näyttää tältä: index
- lisätään css koodit:
- body {
margin:0;
padding:0;
font-size: 100%;
}
.wrapper {
/*border: thin solid #999;*/
margin-left:12px;
margin: 0 auto; /* tämä keskittää laita viimeiseksi */
width:816px;
}
#header {
font-size:2em;
/*border:2px solid #959;*/
height:120px;
margin-bottom:35px;
background-color:#f0ccb6;
}
#sidebarLeft {
width: 290px;
float:left;
/* border:2px solid #959;*/
height:310px;
background-color:#efefef;
}
#sidebarRigth {
width: 520px;
float:left;
border: 2px solid #999;
height:310px;
}
- body {
- tilanne muutosten jälkeen: index