0

trying to image and text on same line but images always stand up little bit above after posting my article.But while my post in draft is,the image is not rebellious What could i do to arrange images and textes in order?

before posting:

enter image description here

after posting:

enter image description here

closed as off-topic by Mayeenul Islam, cybmeta, Michael, TheDeadMedic, Mark Kaplun Feb 23 '15 at 6:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • text <span style="vertical-align: middle;"><img src="path/to/image.ext" alt="img"></span> ends here. You can try the other properties of vertical-align. But the question is not specific to WordPress, hence off-topic here. – Mayeenul Islam Feb 21 '15 at 6:10
3

This is most likely due to differing line-heights and font-sizes between the editor, and the live site. You can try setting the vertical-align on the image (middle), or css position: relative, and setting bottom or top plus or minus a number of pixels. If you do this often, it would be easiest to define a css class and assigning the class to the images.

<img class="inline-image" src="...">

<style>
.inline-image {
   position: relative;
   top: -3px;
}
</style>    
  • so styling images on the same page or with external(by calling) a CSS file which is better? – Dragut Feb 21 '15 at 7:46
  • most people prefer using an external css file. This way the styling rules are all contained in a single location, and the browser can cache it separately. – Brad Feb 21 '15 at 16:33
  • To futher clarify, placing it in an external file means you can reuse it on any post/page. If it were contained within the post/page, it would not be reusable. – Brad Feb 21 '15 at 17:30
  • if i need it for just single page? – Dragut Feb 21 '15 at 18:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.