[HTML] Issues with putting picture to the right? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

[HTML] Issues with putting picture to the right?

I had an issue before where I couldn't center an image but I have fixed it. Now, just for the sake of testing everything; I wanted to put it on the right. My friend recommanded using <aside></aside> but that wont work. Anyone know the code to put an image on the right? Here is my code: <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/HTML.svg/1200px-HTML.svg.png" alt="" height="30%" width="20%">

13th Jan 2018, 3:18 AM
SoloMoney
SoloMoney - avatar
4 Answers
+ 10
<img src="img.src" height=" " width=" " id="img"/> <style> #img { text-align:right; } </style>
13th Jan 2018, 7:47 AM
Shehab Amr
Shehab Amr - avatar
+ 5
Do this if you are using bootstrap- <img class="pull-right" src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/HTML.svg/1200px-HTML.svg.png" alt="" height="30%" width="20%">
13th Jan 2018, 4:01 AM
💻Amey💻
💻Amey💻 - avatar
+ 4
Try with: <img src="url" alt="" style="width=30%; height=20%; float:right;"> ... but look at my comment in your similar previous post: https://www.sololearn.com/Discuss/999577/?ref=app
13th Jan 2018, 8:03 AM
visph
visph - avatar
+ 4
Do the HTML basics course mate ! 😉 HTML5 doesn't allow you to do that, it's the same situation as with your align: center question. Same solution should work here, still the align attribute at play.
15th Jan 2018, 12:40 AM
Mason Neville
Mason Neville - avatar