Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
Autumn, 20 Oct 2026 - @774.71
Forum Activity: Four Stars Random | Recent Posts | Guild Recents
News: There's a great big indie web tomorrow! :smile: Guild Events: Weekly zine jam 17: Fashion
Super News: ~~MelonLand's Halloween Profile Design Contest 2026~~
+  MelonLand Forum
|-+  Da Web Revival
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  How to make custom scroll box?


« previous next »
Pages: [1] Print Embed
Author Topic: How to make custom scroll box?  (Read 981 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: Autumn, 03 Oct 2025 @603 » Toggle Font Embed

Hello!


I am revamping my main website rn, and I wanna make my Todo list a scroll box that's a tomagotchi with my mii inside. So how do I do that? Is there some sort of guide on how to make scroll boxes?

I have attached the overlay I will be using, just as a ref.



* e033d367f8423c9c706ca5d032023397-removebg-preview.png (227.66 kB, 500x500 - viewed 102 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!
Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
Caught by RubbereonYou're a Star!Flinstone VitaminWavy Shoulder-Length Hair with BangsBug!Top Hat
« Reply #1 on: Autumn, 03 Oct 2025 @653 » Toggle Font Embed

This is done by using positioning commands and basically putting a scroll-able div with a fixed width and height to match the image, under the image.

So in your case you'd use this code:
Code
#tama {
  width: 500px;
  height: 500px;
  position: relative;
}

#tama > img {
  pointer-events: none;
  position: absolute;
}

#tama > div {
  width: 170px;
  height: 175px;
  overflow-x: hidden;
  overflow-y: scroll;
  position: absolute;
  top: 150px;
  left: 168px;
  background-color: yellow;
}
Code
<div id="tama">
  <div>
    Hello this is my scroll zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone zone
  </div>
  <img src="https://forum.melonland.net/index.php?action=dlattach;topic=4829.0;attach=6267;image" />
</div>

There's quite a few complex things going on here and you'll need to research each CSS command in your own time to understand fully but the key things to look up are:
  • "position" - relative and absolute - these are different commands to tell the browser how it should position a div on the page.
  • "top" / "left" - these are position values, e.g.how far from the top or the left corner should the div be - their effect changes based on the kind of positioning that's being used.
  • "pointer-events" - this disables the mouse from clicking the image so it does not interfere with the scroll.
  • "overflow" - this tells the browser to either hide or add scroll bars when the content of a div is too big for the div

In this case we set the position of "tama" to be "relative", this means all elements within it will be positioned RELATIVE to the tama div. Later we set both the image and the inner div to "absolute", this means they will be positioned based on absolute values e.g. 150px from the top and 168px from the left - because those values are relative to the tama div, they will be 150px from the top corner of the tama div (as apposed to the top corner of the whole webpage which is default). The image has no positioning values, its just set as absolute; I did this so that the image appears on top of the the scroll box instead of under it, because it looks better that way!

Id also note the values I picked 168px and 150px are not picked by any magic formula; I just kept changing the numbers and reloading the page until it looked right based on the image you supplied - so its just trial and error! The first 500px values on #tama are just the size of the image to make sure nothing tries to squish it.

I also wanna say; positioning is possibly THE MOST confusing thing to learn as a new web craftier, so take your time and don't feel bad if you don't get it right away (it took me years!!!)  :tongue: Just keep trying things and reading the W3 documentation!

« Last Edit: Autumn, 03 Oct 2025 @658 by Melooon » Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Have a chillpillRed Tulip100 coins
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!
« Reply #2 on: Autumn, 03 Oct 2025 @675 » Toggle Font Embed

Alright meloon, thank you!

and yes I agree, positioning is so hard! you gotta do math (which I'm not good at) and guess where you gotta place stuff... its so complicated for like no reason! But I will learn eventually, and I think it'll be fun!

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!
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 Melon
Land
Forum Art Hub Chat Webring Explore Random Recent Tenement Arcade Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Help I'm Lost! Link Land Newsletters Image Stream Minecraft: Online
Zap!
Passport Sites tamaNOTchi Asatte Add your site?
Aero Archive Onio Cafe 32 Bit Cafe Status Cafe