Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 30, 2025 - @678.13 (what is this?)
Activity rating: Two Stars Posts & Arts: 24/1k.beats ~ Boop! The forum will close in 322.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :dive: Are u having fun?? :dive: Guild Events: Melon Jam 2025

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  How to make custom scroll box?


« previous next »
Pages: [1] Print
Author Topic: How to make custom scroll box?  (Read 280 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: October 03, 2025 @602.92 »

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



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:
ball ;-;Known Apple shillcoolest melon on the web!Emergency feel-good teaa silly heart 4 melon :)Hyperactive Donut
« Reply #1 on: October 03, 2025 @652.79 »

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: October 03, 2025 @657.77 by Melooon » Logged


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

Artifact Swap: I met Dan Q on Melonland!poochSlow CreatureIce StoneLasagna
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: October 03, 2025 @674.70 »

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



i AM in LOVE WITh RaYMaN XxX
Play NETPETS today!
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