Just dipping my toes into the world of styling here, so bear with me.
I'm currently working on a React app and attempting to bring an image from a file using the following code:
import cup from './img/cup.png'
My goal is to style it in conjunction with text and other content within the <div>
. Here's what I have tried:
<div style={{display:'inline-block',
textDecoration:'underline',
cursor:'pointer'}}>
<img src={cup} alt=''/>
<h1 className="title is-4">"Item"</h1>
</div>
Unfortunately, this setup doesn't work quite as expected. The image appears too large for my liking.
I've been exploring options to directly reference the image within the inline styles and also control its 'height' and 'width' properties, but haven't come across a solution yet.
Is there a way to achieve this? If so, how can it be done?