+ 5

how to perfectly border an image in this code

<!DOCTYPE html> <html> <head> <style> img { width: 320px; padding: 1 solid gray; border: 5px solid gray; margin: 0; } </style> </head> <body> <h2>Calculate the total width:</h2> <img src="klematis4_big.jpg" width="320" alt="Klematis"> <div>The picture above is 350px wide. The total width of this element is also 350px.</div> </body> </html>

14th Mar 2018, 5:07 AM
Jay Jay
Jay Jay - avatar
6 ответов
+ 8
Sid you are fine calling me @Robert or sir. I'm human!
14th Mar 2018, 9:37 PM
BroFar
BroFar - avatar
+ 5
Sid I corrected some areas in the program you displayed here. Here is your program -> how to perfectly border an image in this code <!DOCTYPE html> <html> <head> <style> <!-- width changed to 348 --> img { width: 348px; padding: 1 solid gray; border: 5px solid gray; margin: 0; } </style> </head> <body> <h2>Calculate the total width:</h2> <!-- You were missing the heigth dimension--> <!-- You had src instead of scr --> <!-- You had 320 in the width --> <img align="center" scr="klematis4_big.jpg" heigth="350" width="350" alt="Klematis"> <div>The picture above is 350px wide. The total width of this element is also 350px.</div> </body> </html>
14th Mar 2018, 5:30 AM
BroFar
BroFar - avatar
+ 2
What do you mean by 'perfectly border'?😕
14th Mar 2018, 5:28 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 2
simply type: border: 1px solid black;
14th Mar 2018, 6:16 AM
mubashir jamali
mubashir jamali - avatar
+ 2
thankyou
14th Mar 2018, 10:39 AM
Jay Jay
Jay Jay - avatar
+ 1
@Jonathan Pizarra like pressing the shirt edge to edge, or you can say .....fixing a block in tetris perfectly,...
14th Mar 2018, 10:38 AM
Jay Jay
Jay Jay - avatar