+ 3
Help! Add an Image!
I really don’t know how to add an image on this app. I used different kinds of things like img and link and whatever. The link is correct. I also don’t know how to put in in the center. Align, margin-right:auto; text-align.. nothing works!! The img is at 20 in HTML and 23 in CSS. Please help! Thank you all! https://code.sololearn.com/W1GNudM64TXH/?ref=app
6 Respuestas
+ 6
To center elements the use of <center> is currently not recommended, since it is not part of HTML 5. One solution would be to do the following:
HTML:
<div>
<img src = "http://www.laurakroon.nl/lauraa.jpg" width = "150px" height = "150px" />
</ div>
CSS:
div {
text-align: center;
}
+ 4
well. it worked for here..
i know i shouldn’t use it for ‘real’ websites. but other ways didn’t work until monique said i could use <center>
next time i try out divs! :) wondering if the floats etc work here..
+ 3
Thank you so beep much!!! I don’t know what <center> is or was, but it worked!!!!
is it an older html?
+ 2
In the HTML it should be ‘src’, not ‘scr’.
+ 2
center its deprecated in HTML5... Remove it and use pure CSS like:
img{
display:block;
margin:0 auto;
}
+ 1
I changed the type error, but the picture still doesn’t show! :( thank you for helping me though!
edit 22:23 :
apparently I had to add http:// into it!? but ohh well! it shows now!
now my other q: how to put it in the center? probably something simple too I just don’t see or forgot!