4

I have these badges in my Github repo:

enter image description here

How can I make them align to left (the 2 above) and to right the one under?

They are in the format ![description](url)

2
  • Can you be more clear about what you're trying to do? "align to left (the 2 above) and to right the one under" is very hard to understand. Commented Mar 31, 2014 at 20:53
  • @Chris, there are 3 badges in the image above. 2 on top, same size each, and the large one with many browsers. I would like to one under (that has 5 browsers) align/float to the right of the other two. Commented Apr 1, 2014 at 21:25

1 Answer 1

5

One way would be to use html table (since markdown table in GFM doesn't support merged cell)

this, for instance, seems to align the pictures properly within a README.md file.

<table > <tr> <td align="left"><img src="http://icons.iconarchive.com/icons/iconka/cat-commerce/48/add-icon.png"/></td> <td align="right"><img src="http://icons.iconarchive.com/icons/iconka/cat-commerce/48/info-icon.png"/></td> </tr> <tr> <td colspan="2"><img src="http://icons.iconarchive.com/icons/shwz/disney/512/pumbaa-icon.png"/></td> </tr> </table> 

Result:

result

In your case:

<table> <tr > <td><img src="https://api.travis-ci.org/axemclion/grunt-saucelabs.png?branch=master"/></td> <td align="right"><img src="https://saucelabs.com/buildstatus/grunt-sauce"/></td> </tr> <tr> <td colspan="2"><img src="https://saucelabs.com/browser-matrix/grunt-sauce.svg"/></td> </tr> </table> 

Which gives:

with svg

Sign up to request clarification or add additional context in comments.

4 Comments

+1 for nice images and a solution that does work with <img> tags. Still I can't get it to work with those badges. Here is a markdown example similar to mine
@Rikard Strange: That seems to work just fine in my README.md: see the markup I used to display your build status pictures in my extended and revised answer.
Ok, got It! Apparently it doesn't work with the markdown format: ![description](url) but both SauceLabs and Travis have also the option of "good old" HTML. So, thanks for the answer!
@Rikard I agree. I tried with markdown first, but couldn't get it to work. I fell back to HTML.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.