I am not able to resize the image which I put in the tribute page,
I have tried with both inline style and CSS but it just dont resize any comments/help
Code with CSS -
<style>
#img {
width: 500px;
length: 500px;
}
</style>
<body>
<div>
<h1 align="center"> Kandarp Deep Shukla</h1>
</div>
<div><h2 align="center"> "Herbinger of a million dreams"</h2>
</div>
<div class="img"><img align="center" width:10% length:10% src="https://iso.500px.com/wp-content/forum/uploads/2014/07/20484.jpg"/>
</div>
</body>
Code with Inline style -
<body>
<div>
<h1 align="center"> Kandarp Deep Shukla</h1>
</div>
<div><h2 align="center"> "Herbinger of a million dreams"</h2>
</div>
<div style="width: 1000px; height: 600px;"> image tag with width and length of 10%
</div>
</body>
********** the editor is not allowing me to put img tag in 2nd example hence I have tried to explain.
There are multiple issues with your code, here are some:
You are not referring to the img class correctly in your styles. #img refers to the img ID, not the img class. It should be .img {/* insert styles */}
You didn’t apply the img class to the image—you applied to the <div> that contains it
I don’t think you can specify length (height?) and width with width: 10% length: 10%—your browser is probably just ignoring them because they don’t make any sense
There are two src='s inside your img tag (possibly not in your original code)
Again, in your second example you are setting the styles to the <div> that contains the image and not the img element itself
It’s worth noting that these are all covered in Free Code Camp HTML5 and CSS challenges (example)—you may want to review them and be comfortable with the ideas before moving onto more complex projects.