Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
December 31, 2025 - @578.66 (what is this?)
Activity rating: Three Stars Posts & Arts: 48/1k.beats Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :happy:  :pc: There are community newsletters here! :pc: :happy: Guild Events: There are no events!

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Img overlay for website??


« previous next »
Pages: [1] Print
Author Topic: Img overlay for website??  (Read 106 times)
EdgyRabbid
Sr. Member ⚓︎
****
View Profile WWWArt


⛺︎ My Room
StatusCafe: edgyrabbid
iMood: EdgyRabbid

Guild Memberships:
Artifacts:
I met Dan Q on Melonland!Raymans Husband!SkeleraveJoined 2025!
« on: December 02, 2025 @749.64 »

I want to make a thing with my Gary Shrine, and use this screenshot as an over lay and have the shrine be under it. would it be a good idea to use absolute positioning? or is there another way i should use to do this?? This is my first time coding something like this, and i would like to know if theres a better way of doing it.


* Computer.png (193.72 kB, 1237x776 - viewed 9 times.)
Logged



i AM in LOVE WITh RaYMaN XxX
Play NETPETS today!
Dan Q
Sr. Member ⚓︎
****
View Profile WWWArt


I have no idea what I am doing
⛺︎ My Room
RSS: RSS

Guild Memberships:
« Reply #1 on: December 02, 2025 @755.78 »

I did something a lot like this for my Beige Buttons (press the "reset" button!). Here's the relevant source code. But the skinny is:

Yes, use absolute positioning. Probably you want to position your image with something like:


Code
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
object-fit: cover;

You'll note I've used fixed, not absolute, positioning. The benefit is that the user can't "scroll past" it (it moves "with" them). The alternative, if you've got a page long enough to potentially scroll, is to set overflow: none; on the body. But position: fixed; is tidier IMHO.

If you want the entire image to be visible regardless of the screen resolution then you'll want object-fit: contain; (and be sure to set a background-color: so it can't be seen "around").
« Last Edit: December 02, 2025 @757.52 by Dan Q » Logged


Artifact Swap: PolyamorousI met Dan Q on Melonland!Joined 2025!Derp DoggoLurby
Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi