28 Şubat 2013 Perşembe
Websitebaker a Css eklemek
Websitebaker a Css eklemek
Geçen ders öğrendiğimiz kendi template inizi yapma işinde if (!defined('WB_PATH')) die(header('Location: ../../../index.php')); kodu yoksa template çalışmaz. tüm template te 35 tane hazır fonksiyon vardır.
body e resim eklemek için <img src="<?php echo TEMPLATE_DIR;?>/images/1.jpg"> kodunu body nin içine yapıştıralım
C:\wamp\www\cemmert\templates\cemmert klasörüne css.css adında bir dosya yapalım.
css dosyasının içine bu kodları yapıştıralım.
.sayfa{color:#09F;
background-color:#990;
font-size:24px;}
body{ background-image:url(images/1.jpg);
background-repeat:repeat; }
hazırladğımız css i template e gömmek için C:\wamp\www\cemmert\templates\cemmert klasöründeki index dosyamıza
<link rel="stylesheet" type="text/css" href="<?php echo TEMPLATE_DIR;?>/csss.css"/> kodunu yapıştıralım(bu kodu </title> </hedaer> arasına yapıştıralım)
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder