Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
May 27, 2026 - @896.83 (what is this?)
Activity rating: Four Stars Posts & Arts: 98/1k.beats Random | Recent Posts | Guild Recents
News: :happy: Open the all windows! Your mind needs storms and air! :happy: Guild Events: Spring Themed Projects

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Relative text area size?


« previous next »
Pages: [1] Print Embed
Author Topic: Relative text area size?  (Read 1751 times)
Cele
Hero Member ⚓︎
*****
View Profile WWW


⛺︎ My Room

Artifacts:
Great Posts PacmanFirst 1000 Members!Joined 2022!
« on: April 13, 2023 @444.44 » Embed

If I have a text area defined to be certain px from left, certain px from top... And certain height, is it possible to make it so the height is always x amount of px from the screen bottom? So it would display in different sizes on different devices.

Code
<div id="textarea" style="position:absolute; top:120px; left:160px; width:750px; height:700px;">

How to replace height 700px with, height is always 80px from the screen bottom?
« Last Edit: April 13, 2023 @447.56 by Cele » Logged

https://64.media.tumblr.com/f339750d47b841f86b411f210c89bc48/a3f9ac693d24060d-e8/s400x600/2fce684b29380077b902465628201ec7b63f98ff.png
http://www.tiptopglobe.com/userbar/7fa851235decd83fb1f04728a2473956.png
http://www.tiptopglobe.com/userbar/f082aecc2519321c0a13c39f701907bf.png
https://img.pokemondb.net/sprites/black-white/anim/normal/gothorita.gif
doubleincision
Sr. Member
****
View Profile WWW


⛺︎ My Room
iMood: doubleincision

Artifacts:
Great Posts PacmanFirst 1000 Members!Joined 2023!
« Reply #1 on: April 13, 2023 @497.51 » Embed

i rarely use calc so i may be wrong, but i think it can achieve what you're looking for?
Logged

https://i.imgur.com/VboGEkt.gif

Nullcasting
Casual Poster ⚓︎
*
View Profile WWW


Great2BeHeretm
⛺︎ My Room

Artifacts:
First 1000 Members!OG! Joined 2021!
« Reply #2 on: April 13, 2023 @679.34 » Embed

 :dunno:  you could try doing percentages instead?

like this:
sudocss {
margin-botton: 35%
}
should theoretically make it so sudocss is 35% off the bottom of the screen. i think.
Logged

https://warp.zone/sitepreview.gif
:pc: Null Casting, She/They :pc:
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
MelonLand @000

Want to Login or Join ?

Minecraft: Online
Join: craft.melonking.net