Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
[SOLVED] Set an image in div - Kevin Powell - Community
KP-C
Kevin Powell - Community
•
13mo ago
•
7 replies
Pat66
[SOLVED] Set an image in div
Hi everyone
I have a problem I want put an image an a div
<
body
>
<
div
class
=
"pic"
>
</
div
>
</
body
>
<
body
>
<
div
class
=
"pic"
>
</
div
>
</
body
>
my css
:
`
`
`css
.pic
{
width
: 300px
;
height
: 400px
;
background
-image
: url
(
'img
/lol
.jpg
'
)
;
background
-attachment
: fixed
;
background
-position
: center
;
background
-size
: cover
;
}
the result I have with cover
Kevin Powell - Community
Join
A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.
36,263
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Put an image in div
KP-C
Kevin Powell - Community / front-end
3y ago
Set some picture in one div
KP-C
Kevin Powell - Community / front-end
2y ago
image overriding a div's bc image
KP-C
Kevin Powell - Community / front-end
3y ago