Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I apply an image to background using inline CSS?

Tags:

html

css

inline

I've tried this:

<div id="test" style="background:url(*Various image links*)>
</div>

But nothing shows.

How do I do it?


1 Answers

also display:block or inline-block, with a size

display:inline-block;
width:100px;
height:100px;
background-image:.....;
like image 175
Tony Ray Tansley Avatar answered Aug 02 '26 19:08

Tony Ray Tansley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!