hit counter

Fixing WordPress Image Alignment

ကြ်န္ေတာ္ ဘေလာ့ဂ္မွာ ပုိ႔စ္တင္တိုင္း image ထည့္ရင္ align center အရင္က အလုပ္မလုပ္ပါဘူး ပို႔စ္ထဲမွာ preview ၾကည့္ရင္ေပၚတယ္။ ဘေလာ့ဂ္ေပၚေရာက္သြားရင္ ဘယ္ဘက္ကပ္သြားေရာ ဒါနဲ႔ သိလိုက္ပါတယ္ CSS ေၾကၿငာဖို႔ လိုေနတယ္ဆိုတာကို။ ဒါေပမယ့္ အပ်င္းကၾကီးေတာ့ မၿပင္ၿဖစ္ပါဘူး။ အၿမဲ center tag သံုးၿပီး ညွပ္ေပးလိုက္တာပါပဲ။ အလုပ္ၿဖစ္တာပဲေပါ့။ လြန္ခဲ့တ့ဲ ရက္ကမွ reader ကေန ကိုယ့္ဘေလာ့ဂ္ကို ၿပန္ၾကည့္ေတာ့မွ အေပၚမွာ ပံုၿပထားတဲ့ အတိုင္း center ညွပ္ထားတဲ့ပံုက more ေအာက္က တစ္ပံု အထိပဲ အလုပ္လုပ္တာ ေတြ႔ရတယ္ ဒါနဲ႔ မၿဖစ္ဘူးၿပင္မွ ရေတာ့မယ္ဆိုၿပီး ၿပင္ၿဖစ္ပါတယ္။ feed ထဲမွာ ကိုယ့္ CSS ဖိုင္က အလုပ္မလုပ္ေပမယ့္ ပံုေတြကို ဘယ္ဘက္ကပ္လဲ အာလံုး အတူတူ ကပ္ႏိုင္ေအာင္ ၿပင္လိုက္တာပါ။ အမွန္က တခ်ိဳ႕ theme ေရးတဲ့ သူေတြက သတိမထားတာပါ.. WordPress မွာ image ကလိုအပ္တဲ့ CSS class ေတြရွိထားပါတယ္ အဲဒါေတြ ထည့္ဖို႔ လိုေနတာပါ။


ဘယ္လိုၿပင္မလဲဆိုေတာ့ style.css မွာ ေအာက္ကၿပထားတဲ့ ကုဒ္ကို ကူးထည့္ုလိုက္ရံုပါပဲ…. ဒါဆိုရင္ ၿပီးပါၿပီ..
ကံဆိုးစြာပဲ IE 6 (နလပိန္းတံုး) က margin : auto ကို နားမလည္ရွာပါဘူး။ အမွန္ကေတာ့ text-align နဲ႔ၿပင္ၾကတာ ေတြ႔ေပမယ့္ image သတ္သတ္ပဲ ရွိေစေတာ့ ဆိုၿပီး အနာဂတ္ကို ေမွ်ာ္ကိုးၿပီး ဒီအတိုင္းထား လိုက္ပါတယ္။ အဆင္ေၿပႏိုင္ပါေစ။

img.center, img.aligncenter, img[align="center"] {
display: block;
margin-left: auto;
margin-right: auto;
}


Related Posts

4 Comments so far »

  1. ၾကယ္စင္မင္း said,

    Wrote on September 25, 2008 @ 2:18 pm

    ေက်းဇူးတင္ပါတယ္..
    ကၽြန္ေတာ္တို႕က ကုတ္ေတြဘာေတြနားမလည္ဘူးခင္ဗ်ာ.. အခုေတာ့ ပံုေတြအားလံုး အလယ္ေရာက္ကုန္လို႔ စိတ္ခ်မ္းသာသြားပါၿပီ

    ေက်းဇူးတင္ပါတယ္ခင္ဗ်ာ။

  2. Violet said,

    Wrote on November 6, 2008 @ 9:16 am

    In terms of bonalnoy erudition – grammotno done!

  3. Bring Down IE6 ~ It’s Time to Unite!! | My Burmese Blog said,

    Wrote on April 18, 2009 @ 9:50 pm

    [...] ကြ်န္ေတာ္ အရင္က တင္ခဲ့တဲ့ Fixing WordPress Image Aligement မ်ိဳး margin: 0 auto; မ်ိဳးကိုလဲ မသိပါဘူး၊ [...]

  4. Devine said,

    Wrote on October 30, 2009 @ 5:16 pm

    အေနာ္ ဘေလာ.တခုတင္ေနတာပါခင္ညာ အဲ့ဒီမွာcbox ထဲ့တာမရဘူးဖစ္ေနလို. ငဘသထထည္.တာကို step by step ကုဒ္ေတြေကာ္ပီၤလုပ္ပီးpaste လုပ္ပီးတဲ.အထိ လုပ္ပံုလုပ္နည္းအဆင္.ဆင္.ကိုေၾကာၾကေပးပါခင္ညာ

Comment RSS · TrackBack URI

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

My Burmese Blog use Gravatars, they are little icons that appear next to your name on this site and on many others. You can get a Gravatar account for free and any other site that supports it will show your avatar too!

Comment: