How to Change the CSS Style, Font, Spacing, Alignment and Color of WordPress Image Captions כיצד לשנות את סגנון CSS, גופן, ריווח, המערך צבע כיתובים של וורדפרס תמונה
Since WordPress מאז וורדפרס version 2.6 גרסה 2.6 , WordPress has added a built-in shortcode, “Caption”, which will be automatically rendered and translated into standard HTML CSS code to display the caption for the photo or image, which saved via media uploader, beneath it. , וורדפרס הוסיפה מובנית shortcode, "כיתוב", אשר תוצג באופן אוטומטי ותורגם קוד ה-HTML רגיל ב CSS כדי להציג את הכיתוב על התצלום או תמונה, אשר הצילה את דרך התקשורת Uploader, מתחתיה.
However, when WordPress appends the DIV styles to print the caption title under the picture or image, WordPress makes use of default alignment, color, font, spacing, and other styling attributes to display the image captions. עם זאת, כאשר וורדפרס ומצרף את הסגנונות DIV להדפיס את הכותרת הכיתוב מתחת לתמונה או תמונה, וורדפרס עושה שימוש יישור ברירת המחדל, צבע, גופן, ריווח סטיילינג תכונות אחרות כדי להציג את התמונה כיתובים.
The default CSS styles for image with the caption may potentially breaks the blog or web page layout, does not validate against W3C xHTML standard, appears too closely with the text with no spacing in the post or page, or does not align as author's wish. ברירת המחדל של סגנונות CSS עבור תמונה עם הכיתוב עשוי פוטנציאלית שובר את הבלוג או פריסה של דף אינטרנט, אינו מאמת נגד הסטנדרט של W3C XHTML, מופיע גם בשיתוף פעולה הדוק עם טקסט עם ריווח לא שלאחר או דף, או אינו רוצה ליישר כמו המחבר.
For blogger who wants to modify the CSS styles of the caption that shows the image captions on screen after parsing the shortcode, add the following CSS code into the active theme's style.css file: Blogger עבור מי שרוצה לשנות את הכיתוב של המציג את התמונה כיתובים על המסך לאחר בניתוח shortcode, סגנונות CSS להוסיף את הקוד CSS הבא לקובץ style.css של ערכת הנושא הפעילה:
/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
/* End captions */
Above HTML CSS declaration is taken from WordPress 2.6 default theme. מעל ה-HTML הצהרת CSS נלקחת WordPress נושא 2.6 ברירת המחדל. These newly added CSS styles are used to control and assign the appearance of the caption for the image posted on blog. אלה שנוסף סגנונות CSS משמשים וניהול להקצות את המראה של הכיתוב על התמונה פורסמה בבלוג. Modify the code above in “style.css” file according to your own preference to have your own design and look. לשנות את הקוד לעיל "style.css" הקובץ לפי ההעדפה שלכם יש עיצוב שלך ותראה.
IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף מכונת תירגם מתפרסם "כמות שהוא" ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to נא עיין original English article המאמר המקורי באנגלית whenever possible. בכל הזדמנות אפשרית.
Related Articles מאמרים קשורים
- How to Disable Image and Video Captions Feature and Auto Adding of Shortcode in WordPress 2.6 כיצד תמונה בטל כיתובים וידאו מאפיין אוטומטי של הוספת Shortcode ב-WordPress 2.6
- Caption Disabler WordPress Plugin to Disable and Remove Captions Functionality כיתוב Disabler WordPress Plugin כדי בטל כיתובים פונקציונליות הסרה
- Switch and Change Back to Office 2003 Default Font and Style Set in Office Word 2007 מתג שינוי לראש גופן ברירת המחדל של Office 2003 ואת הגדר סגנון ב-Office Word 2007
- Download ING Change Font to Personalize your Windows Mobile Device הורד ING שינוי גופן כדי להתאים אישית את מכשיר Windows Mobile שלך
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page כיצד לשנות את תדירות או מרווח וורדפרס אוטומטי חוסך עריכת פוסט או עמוד
- How to Customize, Modify or Change WordPress Database Connection Error Page כיצד להתאים אישית, שינוי או שינוי וורדפרס חיבור מסד דף שגיאה
- WordPress 2.6 with Change Revision Tracking Feature Available for Free Download וורדפרס 2.6 עם שינוי עדכון תכונת מעקב זמינים עבור הורדה חינם
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginating או פיצול וורדפרס פוסט או עמוד עם NextPage ב-WordPress לא תקין
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin 3 טור הרפיית WordPress נושאים הערות עבור-paged.php תגובות מעומד-WordPress Plugin
- AdSense New Ads Style with Horizontal Image and Ad Links סגנון מודעות AdSense חדש עם תמונה אופקי מודעות קישורים










































October 27th, 2008 18:05 27 אוקטובר 2008 18:05
Wow, klasse für den CSS-Tipp. וואו, דן מתאריך klasse CSS-Tipp. Habe den gleiche mal eingebaut und finde die Formatierung einfach klasse. Gleiche habe דן eingebaut und finde mal למות Formatierung einfach klasse. Sieht optisch sehr ansprechend aus. Aus Sieht ansprechend sehr optisch.
Danke und gruss Gruß und Danke
September 16th, 2008 01:05 16 ספטמבר 2008 01:05
Thank you so much for sharing this code! תודה רבה לך על שיתוף קוד זה! I was going nuts trying to figure out how to fix my captions! הייתי משתגע מנסה להבין איך לתקן את הכיתובים שלי!
July 20th, 2008 10:05 20 יולי 2008 10:05
For the life of me, I cannot get captions to work. על חייו של לי, אני לא יכול לקבל כיתובים לעבוד. It looks great in preview, but live, all the code spills out around the photo and there's no caption at all. זה נראה נהדר בתצוגה המקדימה, אבל חיים, כל קוד נשפך החוצה סביב לתמונה ואין כיתוב בכלל. I added the caption code to my theme's style.css but there was no change. הוספתי את הקוד הכיתוב כדי style.css של ערכת הנושא שלי אבל לא היה שום שינוי. Seems like I'm just one minor step away from making this work. נראה כאילו אני רק צעד אחד רחוק מינור עושה את העבודה הזאת. If anyone has any ideas, I'd love to hear them. אם למישהו יש רעיונות, אני אשמח לשמוע אותם. I'll add a caption to my first post to demonstrate. אני מוכן להוסיף כיתוב על ההודעה הראשונה שלי כדי להדגים.