April 18, 2010

Tutorial | BACKGROUND PICTURE (image) BEHIND SIDEBAR TITLE

Nak tahu tak bagaimana cara nak menambah background picture di belakang sidebar title blog korang seperti blog ini? First sekali apa yang korang perlu buat ialah mencari atau mencipta sendiri gambar yang korang mahu jadikan sebagai background sidebar. Korang perlu resize / crop pic tersebut mengikut kesesuaian Sidebar width (otherwise, ianya akan cropped).

Contohnya, gambar yang aku guna ialah bersaiz 184px wide, and 56px height. Well, to be honest, korang kena bermain-main dengan benda ni sikit, sampai lah korang dapat saiz yang betul. Contoh camni:




  or  

Then after gambar dah siap, korang kena upload gambar tu dalam free web host (contohnya macam Photobucket, Picasa, TinyPic etc.) untuk mendapatkan URL dia. Bila dah siap, pergi ke Layout --> Edit HTML and click Ctrl+F and taip kat situ '.sidebar h2{'. Cari sampai dapat ye. Then tambah line (berwarna hijau) ke dalam code :


.sidebar h2 {
background:url(URL OF THE PICTURE)no-repeat;
margin:0px;
padding:0px 
0.9em;
line-height:
53px;
}

  • replace URL OF THE PICTURE dengan URL address hosted picture korang tadi. e.g : http://photobucket.jpg
  • yang warna orange tu, sebenarnya korang boleh adjust alignment title.
  • biru, untuk increase or decrease line height (so kalau korang ada picture  yang 22px height, setlah line height kepada 22px). Hasilnya TADAA.. Selamat mencuba :)
P/S : After baca jangan lupa click-click nuff and drop comment ya. :) Thank you.
Let me know if benda ni tak jadik. If tak boleh jugak, try copy paste kat comment box kat bawah ni ye..

XOXO,

24 Comments:

khai said... [Reply to comment]

tu dia. hunny bunny dah mula keluar tutorial. keep it up. wakaka.

mkn kfc jum!

OCEAN ROVERS said... [Reply to comment]

nice info..kene try nih

ika yunos said... [Reply to comment]

khai : haha, tutorial yg senang2 bolehlah wat.

kfc? kau belanja lah.

ika yunos said... [Reply to comment]

imam : wat cepat! (tibe nak pakse) lol

naem said... [Reply to comment]

x leh copy la code tu..

ika yunos said... [Reply to comment]

Eh2, sorry.. sebab blog ni mmg disable copy paste. copy dari sini ye..:


.sidebar h2 {

background:url(URL OF THE PICTURE)no-repeat;

margin:0px;

padding:20px 0px 20px 0px;

line-height:22px;

Unknown said... [Reply to comment]

x bleh jgak...he3..xpela...salin..

Unknown said... [Reply to comment]

ok..tq akk :)

ika yunos said... [Reply to comment]

hehe. olraitt dik...

Unknown said... [Reply to comment]

nanti aku try k? hehehhe

ika yunos said... [Reply to comment]

kepada yg tak boleh wat jugak mcam yg kat atas tu or tak jumpa .sidebar h2, boleh try yang bawah ni.. cari bahagian "headings.."

h2 {

background:transparent;
background-image:url(URL OF THE PICTURE);background-repeat:no-repeat; background-position:bottom center;
color:$sidebarcolor;
padding:20px 0px 20px 0px;
font:$headerfont;
line-height:22px;
text-transform:none;
letter-spacing:1px;;
text-align:center;
border:0px double #f3e4c9;
}

~~nAzIrAh aShAr~~ said... [Reply to comment]

niwh yang aku da wat..

h2 {

background:transparent;

background - image:;background-repeat:no repeat;background-position:buttom-center;

color:$sidebarcolor;

padding:20px 0px 20px 0px;

font:$headerfont;

line-height:22px;

text-transform:none;

letter spacing:1px;

text-align:center;

border:0px double #000000;


}

ika yunos said... [Reply to comment]

mana background image url nya? hehe

e.g :

background-image:url(http://photobucket.jpg);

lagi satu position tu bottom.. hehe

ika yunos said... [Reply to comment]

background-image tu kene rapat kott...

~~nAzIrAh aShAr~~ said... [Reply to comment]

eh gedik komen niwh..aku da letak da url yew..sabor jela..hua5

FarhanaFabulous said... [Reply to comment]

emm..cam xjadi buat tutorial ni la..:(

FarhanaFabulous said... [Reply to comment]

da jadi da...tQ ye..hehe..

ika yunos said... [Reply to comment]

hehe, jadi dah? ok2.. welcome..

playwifwords said... [Reply to comment]

berjaya! check it out... even tak lawa la... hahaha

HANNA PLEASURE said... [Reply to comment]

hi honey, mcm best aje..nk try jugak ye...tq

Hanietwisties said... [Reply to comment]

akak,macam mana kita nak buat bentuk bulat tu ek?

Julia said... [Reply to comment]

tq hunnybunny.....nice tutorial!!!

Anonymous said... [Reply to comment]

nanti nak cube ! tengs sis ;D

whazzup Syahida..! said... [Reply to comment]

ala x faham la..=(