PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, July 29, 2022

[FIXED] Why Markdown does not align image properly?

 July 29, 2022     alignment, github, image, line-breaks, markdown     No comments   

Issue

I am using below lines for getting aligned images in a row in Github markdown, but last image always breaks the line even though there are space.

Code

# Example Img alightment #
<img align="left" src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
<img align="center" src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
<img align="right" src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>

Output

enter image description here

How can I align all three images in single row?

Reference: https://github.com/hissain/CoronaTracker/blob/dev/architecture/example.md


Solution

If you just need them in one row without centering you can do the following (just place images without new lines or with the <p> tag):

<img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/> <img src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>

or

<p>
  <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
  <img src="https://github.com/hissain/CoronaTracker/blob/master/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
  <img src="https://github.com/hissain/CoronaTracker/blob/dev/architecture/Screenshots/Android/Screenshot_Registration.png" alt="Android Registration" width="200"/>
</p>


Answered By - ilya.lehchylin
Answer Checked By - Candace Johnson (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing