+ 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>
6 Answers
+ 8
Sid you are fine calling me @Robert or sir. I'm human!
+ 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>
+ 2
What do you mean by 'perfectly border'?đ
+ 2
simply type:
border: 1px solid black;
+ 2
thankyou
+ 1
@Jonathan Pizarra
like pressing the shirt edge to edge, or you can say .....fixing a block in tetris perfectly,...