Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
an Autumn day «earthquake chat» - @611.03
Activity rating: Four Stars Posts & Arts: 74/1k.beats Random | Recent Posts | Guild Recents
News: :happy: Open the all windows! Your mind needs storms and air! :happy: Guild Events: 10: window

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


« previous next »
Pages: [1] Print Embed
Author Topic: Img overlay for website??  (Read 853 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: a Winter day » Embed

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 32 times.)
Logged

https://i.ibb.co/Q7WhR6bG/0x0830-C1-D4-96-4.gif
http://internetometer.com/imagesmall/51063.png
i AM in LOVE WITh RaYMaN XxX
Play NETPETS today!
Dan Q
Hero Member ⚓︎
*****
View Profile WWWArt


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

Guild Memberships:
Artifacts:
Dan Q Cruisin'I DIDN'T meet Dan Q on Melonland!Visited on Melon's 10th Anniversary!
« Reply #1 on: a Winter day » Embed

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: a Winter day by Dan Q » Logged

https://danq.me/_q26t/badges/dan-q-88x31-lighter.gif https://danq.me/_q26t/badges/dan-q-88x31-peekaboo-scroller.gif https://beige-buttons.danq.dev/beige-buttons-88x31.gif https://embed-html.danq.dev/embed-html-88x31.gif

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

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | Send Feedback | Supporters ♥ 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
@000 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net