Subscribe to RSS feed Subscriure's al feed RSS or o follow me em segueixen on Twitter? a Twitter?
Images add scenic beauty to posts (unless you include really bad images). Imatges afegir bellesa escènica als llocs (a menys que inclogui imatges realment dolenta). Most bloggers advise you to include images at the at or around the beginning of your posts. La majoria dels bloggers us convidem a incloure imatges en el en o al voltant del començament de les seves entrades. And I am no different. I jo no sóc diferent.
However, one thing that those advice does not contain is how to include images which blend well with the content, yet be noticeable by a reader. Tanmateix, una cosa que els consells no conté és la forma d'incloure les imatges que es barregen amb el contingut, no obstant, ser visible per un lector. Selecting the right image is important, but so is the way you place them. Selecció de la imatge de la dreta és important, però també ho és la forma en què situar-los. Including an image with an uninspiring <img src=”" / > tag is just not in anymore – they're so web 1.0/year 1998. Inclou una imatge amb una mica inspirat <img src="" /> és només que no en més - són tan web 1.0/year 1998.
I prefer to use centered images, with the width slightly less than your post area width. Jo prefereixo usar les imatges centrades, amb l'amplada lleugerament inferior al seu ample de la zona posterior. This example shows you how to center the image, and add caption. Aquest exemple mostra com el centre de la imatge, i afegir el títol.
What you need now is a sensible, easy way to format images, without spending the whole day on it. El que necessitem ara és una assenyada manera fàcil a les imatges de format, sense passar tot el dia en ell. This can be achieved by a combination of two things – a CSS styling rule to be added to your style.css , and some HTML code which you have to wrap around your image. Això es pot aconseguir mitjançant una combinació de dues coses - una regla d'estil CSS per a ser afegit a la seva style.css i una mica de codi HTML que has d'embolicar la imatge.
Note that this cannot be used for images previously added, without editing them. Tingueu en compte que això no pot ser utilitzat per a les imatges prèviament afegit, sense editar. The reason: while CSS styling rule affects all elements, HTML markup has to be manually added around each image. La raó: mentre que la regla d'estil CSS afecta tots els elements, el format HTML s'ha d'afegir manualment al voltant de cada imatge.
Add this code to your style.css file, towards the end: Afegir aquest codi al vostre fitxer style.css cap al final:
div.ci { text-align: center; margin: 0; padding: 16px 0; padding: 0; border: none; }
div.ci small { font-size: .9em; line-height: 1.4em; color:#777; padding: 7px 0 0 0; }
The code above is the styling rules which help you to position the image. El codi anterior són les normes d'estil que l'ajuden a la posició de la imatge. To apply the styling, we need to use HTML around the image tag. Per aplicar l'estil, hem d'usar HTML al voltant de la imatge. The HTML code is as follows: El codi HTML és el següent:
<div class="ci"><img src="URL_TO_IMAGE" alt="ALT TEXT" /><br />
<small>YOUR CAPTION</small></div>
In the code, replace URL_TO_IMAGE with the image URL, ALT TEXT with what you want to show when the image is not displayed, and YOUR CAPTION with the caption that you want. En el codi, substituïu URL_TO_IMAGE amb l'URL de la imatge, text ALT, amb el que voleu mostrar quan la imatge no apareix, i el títol SEVA amb el títol que desitja.
Alternatively, you can remove the caption, by using this code: Com a alternativa, pot treure el títol, mitjançant l'ús d'aquest codi:
<div class="ci"><img src="URL_TO_IMAGE" alt="ALT TEXT" /></div>
Remember to tweak the caption colour, size and font to your liking, and your images will rock! Recordi que ha d'ajustar el color de títol, la mida i tipus de lletra al seu gust, i les seves imatges es rock!
Related reading Lectura relacionada
- Post codes to blog posts/comments with Postable Codis postals als llocs de bloc / comentaris amb compostable
- Top 12 ways to make your blog posts digg-friendly Top 12 maneres de fer que el seu blog digg-friendly
- What topics would you like to read more posts on? Quins temes li agradaria llegir més sobre els llocs?
- Do not forget http:// in WordPress posts No us oblideu de http:// en els llocs de WordPress
I see you're sharing some of your jewels! Veig que estàs compartint algunes de les seves joies! Thanks. Gràcies. Even when it looks basic it's not the same when you don't have a clue about what the CSS is. Tot i que sembla fonamental que no és el mateix quan no tens ni idea del que el CSS és.
@TonNet: Welcome. @ TonNet: Benvinguts. And just between the two of us, I have something to help you out in that matter – stay tuned I només entre nosaltres dos, tinc alguna cosa per ajudar-te en aquesta matèria - Mantingui's informat
Noticed that the blog was down today – were you upgrading to 2.3? Compte de que el bloc s'estableixen avui - que s'actualitza a 2.3?
@Karthik: Yes, I upgraded to WP 2.3 – see my post about it and more Karthik @: Sí, He actualitzat a WP 2.3 - veure el meu post sobre això i molt més here aquí . . So, did you? Així que, no?
Hey Author , thats nice . Autor Hey, això és bo. but i think you miss a “DEMO” thing for this post . però crec que s'oblida de prendre un "demo" alguna cosa per aquest lloc.