+ 1

Total beginner! How to align image or Iframe

Hi, Just starting out on HTML and Coding. I've played about with the My Blog exercise and am unable to align the Iframe tag or an Image. I can't find my way back to how to do this in the code... any pointers? Thanks!

23rd Jan 2018, 8:56 PM
Clare
Clare - avatar
2 Respostas
+ 2
You can do it via different ways. For instance, you can set 'display: block' and use 'margin' with value 'auto'. And depends on side what you need, you can set 'margin-left: auto' or 'margin-right:auto'. Also you can wrap img/iframe in div element. And use simple 'text-align' on div.
23rd Jan 2018, 9:54 PM
Шыряй Баян
Шыряй Баян - avatar
+ 1
Thanks! So, I tried text-align- but I don't think my code was correct- I will make sure I wrap the image, and try again. Appreciate the advice for a beginner! :)
24th Jan 2018, 12:31 AM
Clare
Clare - avatar