Home Events! Entrance Everyone Wiki Search Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 24, 2024 - @796.03 (what is this?)
Forum activity rating: Three Stars Posts: 35/1k.beats ~ Boop! The forum will close in 204.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts    Start New Topic
News: :dive: Are u having fun?? :dive:

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


« previous next »
Pages: [1] Print
Author Topic: Relative text area size?  (Read 672 times)
Cele
Sr. Member
****

any way the wind blows

⛺︎ My Room

View Profile

First 1000 Members!Joined 2022!
« on: April 13, 2023 @444.44 »

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
doubleincision
Full Member
***


⛺︎ My Room
iMood: doubleincision

View Profile WWW

First 1000 Members!Joined 2023!
« Reply #1 on: April 13, 2023 @497.51 »

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



Nullcasting
Casual Poster ⚓︎
*


Great2BeHeretm

⛺︎ My Room

View Profile WWW

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

 :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


:pc: Null Casting, She/They :pc:
Pages: [1] Print 
« previous next »
 

Vaguely similar topics! (3)

Website size

Started by RolyBoard ✁ ∙ Web Crafting

Replies: 61
Views: 9209
Last post November 07, 2024 @539.79
by Turboblack
Earthbound Text Generator

Started by ObspogonBoard ♖ ∙ Video Games

Replies: 7
Views: 4808
Last post March 04, 2023 @848.91
by sig
TinyTIM - A cool multiplayer text adventure

Started by MelooonBoard ♖ ∙ Video Games

Replies: 4
Views: 2489
Last post February 22, 2022 @48.80
by demonologi

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies 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