CSS ve Div kullanımı ile ilgili tasarım örneklerine devam ediyoruz. Örnek web site şablonu için ornek-4.html ve css-4.css dosyalarına ait kodları ve ekran görüntüsünü inceleyebilirsiniz.
ornek-4.html kodları:
css-4.css kodları:

ornek-4.html kodları:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <link href="css-4.css" rel="stylesheet"> </head> <body> <div id="sayfa"> <div id="ust"> </div> <div id="menu"> </div> <div id="icerik"> <div id="sol"> </div> <div id="orta"> </div> <div id="sag"> <div class="kutu"> </div> <div class="kutu"> </div> <div class="kutu"> </div> </div> <div style="clear: both"> </div> </div> <div id="alt"> </div> </div> </body> </html> |
css-4.css kodları:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | body { margin:0; } #sayfa { width:980px; margin:0 auto; /*www.yazilimkodlama.com */ } #ust { height:120px; background:#001139; } #menu { height:30px; background:#0081f9; } #sol,#sag { float:left; width:200px; height:600px; background:#0b9e8e; } #orta { float:left; width:580px; height:600px; background:#7c84c0; } .kutu { width:180px; height:180px; background:#ddaa00; margin:10px; /* kutunun çevresine 10px boşluk verdik */ } #alt { height:60px; background:#672a65; } |