How to Change the CSS Style, Font, Spacing, Alignment and Color of WordPress Image Captions Kaip pakeisti CSS stilius, šriftas, tarpų, lygiuoti ir spalva WordPress Vaizdo Parašai
Since WordPress Kadangi WordPress version 2.6 versija 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. , WordPress papildė įmontuotą Trumpa, "parašas", kuris bus automatiškai suteiktas ir perskaičiuojami į standartinius HTML CSS kodas rodyti parašas nuotrauką ar paveikslėlį, kuriame saugomi su žiniasklaidos Uploader, po jos.
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. Tačiau, kai WordPress prideda div style spausdinti parašo pavadinimą pagal nuotrauką ar paveikslėlį, WordPress naudoja numatytąjį derinimą, spalvą, šrifto, tarpų ir kitų stiliaus atributai rodyti vaizdus parašai.
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. Numatytasis stilius CSS vaizdo su parašo gali pertraukos į interneto dienoraštį arba interneto puslapio išdėstymą, nėra patvirtinti prieš W3C XHTML standartas, yra pernelyg glaudžiai susijęs su tekstu, be jokių tarpų ir paštu arba puslapio ar nėra suderinti su autoriaus pageidavimu.
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: Norėdami Bloggers, kurie nori pakeisti CSS stilius parašą, kuris rodo vaizdą užrašai ekrane po analizuojant trumpas, pridėkite CSS kodą į aktyvų teminius style.css failą:
/* 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. Ši HTML CSS deklaracija paimta iš WordPress 2,6 nutylėjimą temą. These newly added CSS styles are used to control and assign the appearance of the caption for the image posted on blog. Šie naujai pridėtų CSS stilių yra naudojami siekiant kontroliuoti ir priskirti išvaizdą parašo dėl atvaizdą paskelbtas dienoraštyje. Modify the code above in “style.css” file according to your own preference to have your own design and look. Keisdami kodą į "style.css" faile pagal savo pirmenybę turėti savo dizainą ir išvaizdą.
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- How to Disable Image and Video Captions Feature and Auto Adding of Shortcode in WordPress 2.6 Kaip išjungti Vaizdo ir vaizdo Parašai funkcija ir automatinio Pridėjimas Trumpa į WordPress 2,6
- Caption Disabler WordPress Plugin to Disable and Remove Captions Functionality Caption Disabler WordPress Plugin išjungti ir pašalinti Parašai Funkcionalumas
- Switch and Change Back to Office 2003 Default Font and Style Set in Office Word 2007 Iešmų ir kaitos Grįžti į "Office 2003" Numatytasis šriftas ir stilius Nustatyti Office Word 2007
- Download ING Change Font to Personalize your Windows Mobile Device Parsisiųsti Inga Keisti šriftą į Personalizacija Windows Mobile
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page Kaip pakeisti dažnumas arba intervalas WordPress Auto išsaugo Redaguoti Skelbti arba
- How to Customize, Modify or Change WordPress Database Connection Error Page Kaip pritaikyti, Keisti arba Keisti WordPress prisijungti prie duomenų bazės klaida Puslapis
- WordPress 2.6 with Change Revision Tracking Feature Available for Free Download WordPress 2,6 su Keisti redakcija stebėjimo funkciją galima atsisiųsti nemokamai
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginating ar Splitas WordPress Skelbti arba su Nextpage į WordPress neveikia
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin 3 skiltis Relaksacyjny WordPress temos komentarus-paged.php už Paged-Komentarai WordPress Plugin
- AdSense New Ads Style with Horizontal Image and Ad Links AdSense Nauji skelbimai stilius su Horizontalus vaizdo ir reklamos Nuorodos










































October 27th, 2008 18:05 Spalis 27, 2008 18:05
Wow, klasse für den CSS-Tipp. Wow, Klasse für den CSS Tipp. Habe den gleiche mal eingebaut und finde die Formatierung einfach klasse. Habe den Gleiche su eingebaut und finde die formatierung einfach klasse. Sieht optisch sehr ansprechend aus. Sieht optisch sehr ansprechend aus.
Danke und gruss Danke und Gruß
September 16th, 2008 01:05 Rugsėjis 16, 2008 01:05
Thank you so much for sharing this code! Thank you so much for sharing šį kodą! I was going nuts trying to figure out how to fix my captions! Aš vyko riešutai bando suprasti, kaip pataisyti savo parašo!
July 20th, 2008 10:05 20 liepa 2008 10:05
For the life of me, I cannot get captions to work. Nes gyvenimas man, I can't get parašai dirbti. It looks great in preview, but live, all the code spills out around the photo and there's no caption at all. Atrodo didelis išklausyti, bet gyvena, visi kodas išsiliejimus aplink nuotrauką ir nėra parašo ne visiems. I added the caption code to my theme's style.css but there was no change. Dodałem parašo kodą į savo teminius style.css bet nebuvo pakeisti. Seems like I'm just one minor step away from making this work. Seems like I'm just vieną nedidelį žingsnį nuo priėmimo šis darbas. If anyone has any ideas, I'd love to hear them. Jei kas nors kokių nors idėjų, aš mėgstu klausytis jų. I'll add a caption to my first post to demonstrate. Aš pridėti parašą prie savo pirmąjį pranešimą parodyti.