How to Change the CSS Style, Font, Spacing, Alignment and Color of WordPress Image Captions Kā nomainīt CSS stilu, Font, atstarpēm, Regulēšana un krāsu WordPress attēlu parakstus
Since WordPress Kopš WordPress version 2.6 versiju 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 ir papildināts ar iebūvētu shortcode, "Caption", kas automātiski tiks taisīts un tulko standarta HTML CSS kodu, lai parādītu parakstu par fotogrāfiju vai attēlu, kas saglabāts ar plašsaziņas augšupielādētāju, zem tā.
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. Tomēr, ja WordPress appends ar DIV stili iespiest Caption nosaukumu saskaņā ar attēlu vai attēls, WordPress izmanto noklusējuma pielīdzināšanu, krāsa, fonts, atstarpe, un citas modelēšana atribūti, lai parādītu attēlu parakstus.
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. Noklusējuma CSS stili attēlu ar parakstu var potenciāli pārtraukumiem blogā vai tīmekļa lapas izkārtojumu, nav apstiprināt pret W3C XHTML standarta, šķiet pārāk cieši ar tekstu bez atstarpēm, kas pastu vai lapu, vai nav saskaņot kā autors vēlas.
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: For blogger, kas vēlas mainīt CSS stilus no parakstu, kas parāda attēlu parakstus uz ekrāna pēc parsēšana ar shortcode pievieno šādu CSS kodu aktīvās tēmas style.css failu:
/* 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. Virs HTML CSS deklarāciju ņem no WordPress 2,6 noklusēto tēmu. These newly added CSS styles are used to control and assign the appearance of the caption for the image posted on blog. Šīs tikko pievienotās CSS stili tiek izmantoti, lai kontrolētu un piešķirt tādu izskatu, titrs foto ievietoti blog. Modify the code above in “style.css” file according to your own preference to have your own design and look. Modificējiet kods iepriekš "style.css" failu saskaņā ar savu priekšroka ir savu dizainu un izskatu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- How to Disable Image and Video Captions Feature and Auto Adding of Shortcode in WordPress 2.6 Kā Disable Image un video parakstus Feature un Auto pievienojot Shortcode in WordPress 2,6
- Caption Disabler WordPress Plugin to Disable and Remove Captions Functionality Caption Disabler WordPress Plugin uz Disable un Remove parakstus funkcionalitāte
- Switch and Change Back to Office 2003 Default Font and Style Set in Office Word 2007 Switch un pārmaiņām Atpakaļ uz Office 2003 Default Font un Style Set Office Word 2007
- Download ING Change Font to Personalize your Windows Mobile Device Download ING Maina Font lai personalizētu jūsu Windows Mobile Device
- How to Change the Frequency or Interval WordPress Auto Saves An Editing Post or Page Kā nomainīt biežumu vai Interval WordPress Auto Ietaupa An Editing Post vai
- How to Customize, Modify or Change WordPress Database Connection Error Page Kā Pielāgot, grozīt vai mainīt WordPress Database Connection Error Page
- WordPress 2.6 with Change Revision Tracking Feature Available for Free Download WordPress 2.6 Maina Revision Tracking Feature Pieejams Free Download
- Paginating or Split WordPress Post or Page with NextPage in WordPress Not Working Paginating vai sadalīt WordPress Post vai ar Nextpage in WordPress Not Working
- 3 Column Relaxation WordPress Theme comments-paged.php for Paged-Comments WordPress Plugin 3 Column Atpūta WordPress Theme komentārus-paged.php par Paged-Komentāri WordPress Plugin
- AdSense New Ads Style with Horizontal Image and Ad Links AdSense jaunas reklāmas Style ar horizontālo Image un reklāmu Saites










































October 27th, 2008 18:05 Oktobris 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 mal 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 Septembris 16, 2008 01:05
Thank you so much for sharing this code! Thank you so much for sharing šo kodu! I was going nuts trying to figure out how to fix my captions! Es biju kas rieksti Mēģinot saprast, kā noteikt manu parakstus!
July 20th, 2008 10:05 Jūlijs 20, 2008 10:05
For the life of me, I cannot get captions to work. Par dzīvi mani, es nevaru saņemt parakstus uz darbu. It looks great in preview, but live, all the code spills out around the photo and there's no caption at all. Tas izskatās ļoti liels preview, bet dzīvo, visas kods noplūdēm, kas ap foto un nekāda Caption vispār. I added the caption code to my theme's style.css but there was no change. I pievienoja Caption kods uz manu tēmas style.css bet nebija izmaiņām. Seems like I'm just one minor step away from making this work. Šķiet es esmu tikai viens neliels solis prom no Veicot šo darbu. If anyone has any ideas, I'd love to hear them. Ja kāds ir jebkuras idejas, I'd love to uzklausīt tos. I'll add a caption to my first post to demonstrate. I'll pievienot parakstu ar savu pirmo ierakstu, lai pierādītu.