+ 1

How do you place an image at the center or at the left side of a page ?

I tried using the align attribute ( < p align=""> ) but it works only for text I guess , so what should we do to place an image at center or anywhere else ?

10th Apr 2017, 4:12 PM
Satyageeth Naga
Satyageeth Naga - avatar
6 Antworten
+ 2
first you have to add viewport meta tag in head like this <meta name="viewport" content="width=device-width, initial-scale=1"> then add this attribute to you container like this <div style="text-align: center" > <img src="path" ></img> </div> and if you comfortable with flexbox then use flexbox box in container like this display: flex; justify-content: center // for horizontal alignment align-items: center; // for vertical alignment
10th Apr 2017, 4:30 PM
Keshave Jat
Keshave Jat - avatar
+ 1
you will learn this in css part
10th Apr 2017, 4:37 PM
Keshave Jat
Keshave Jat - avatar
+ 1
if you are in learning phase plz plz only use chrome as your learning browser.
10th Apr 2017, 4:39 PM
Keshave Jat
Keshave Jat - avatar
0
thanks ! it worked :) and btw at which part of the programming do I learn it ? right now I'm learning the images part of HTML
10th Apr 2017, 4:37 PM
Satyageeth Naga
Satyageeth Naga - avatar
0
ohk got it , thanks !
10th Apr 2017, 4:41 PM
Satyageeth Naga
Satyageeth Naga - avatar
0
yeahh , I'm using chrome as my learning browser
10th Apr 2017, 4:44 PM
Satyageeth Naga
Satyageeth Naga - avatar