Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
September 09, 2026 - @302.29
Activity rating: Three Stars Posts & Arts: 48/1k.beats Random | Recent Posts | Guild Recents
News: :4u: ~~~~~~~~~~~ Guild Events: There are no events!

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Help with wiki styled gallery?


« previous next »
Pages: [1] Print Embed
Author Topic: Help with wiki styled gallery?  (Read 2414 times)
LittleGr33nIMP
Casual Poster ⚓︎
*
View Profile WWW


"Yay for me, Luigi!" -Luigi
⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2022!
« on: February 13, 2023 @276.82 » Embed

EDIT: Accidentally attached two copies of the same files my bad. :drat:

How TF do you make a wikipedia styled gallery? :TnT: :pc:

Hey guys I'm currently working on updating this gallery section that I'm working on.
I tested different sized images and I sadly found out that vertical images changed the height of the gallery figure elements. I wanted containers that hold vertical images to maintain the same size as all the other gallery figures.

TLDR: I basically just want the figure elements in the gallery section to be roughly around 150px wide and tall, while keeping the images actual aspect ratio.

I'm asking here since I tried what I know and attempted looking stuff up and I'm kinda stumped. I've attached both the html and css if you want a more thorough look.


Here's an example of what I'm trying to go for with my gallery figures:
https://zeldawiki.wiki/wiki/Groose#Gallery

Here's 2 screenshots showing the issue.

Desktop:
https://i.imgur.com/VfSU9pB.png

Mobile:
https://i.imgur.com/r4n2p1D.png



* dummy.html (26.15 kB - downloaded 51 times.)
* common.css (14.64 kB - downloaded 60 times.)
* common.css (14.64 kB - downloaded 56 times.)
* dummy.html (26.15 kB - downloaded 55 times.)
« Last Edit: February 13, 2023 @278.36 by LittleGr33nIMP » Logged

Oh look it's some turtles with my butto-HEY WAIT GET BACK HERE!

🐢🐢 https://i.imgur.com/gq4zUni.gif 🐢🐢

https://i.imgur.com/crdMKx0.jpg
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:
Wavy Shoulder-Length Hair with BangsTop HatBug!You're a Star!Flinstone VitaminI got robbed by Dan Q on Melonland!
« Reply #1 on: February 13, 2023 @728.54 » Embed

Soooo if I understand - you are asking how you can make images of any aspect (tall wide etc) fit into a standard box size without warping? That's an easy one :grin: Just wrap the image in a box and then set a fixed size on the box but a flexable size on the image!

CSS:
Code
.image_box {
  width: 150px;
  height: 150px;
}

.image_box img {
  max-height: 100%;
  max-width:100%;
}
HTML:
Code
<div class="image_box">
  <img src="https://melonking.net/images/window-3.gif" />
</div>
Here I have put a very tall image in a div called image_box - the box is limited to 150px - if the image is to tall it will be squished down, or if its too wide it will be squished sideways, but it will always keep its aspect!

Logged


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

Artifact Swap: Have a chillpillMove it, football head!black n orange yappin kittayRed Tulip100 coinsLurbyxDeyntivemds pet fishGreen partyhatPlankGo dig, girl!Maya's Magatama
LittleGr33nIMP
Casual Poster ⚓︎
*
View Profile WWW


"Yay for me, Luigi!" -Luigi
⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2022!
« Reply #2 on: February 13, 2023 @844.50 » Embed

Woo it took a bit but I kinda got something working!  :ozwomp: :pc:
Until opera's android browser updates their compatibility with flex basis sadly this page might look a little scuffed lol.  (on the opera android browser)

Here's what it looks like now!

PC:
https://i.imgur.com/tu6vrSY.png

Mobile:
https://i.imgur.com/wECcXn4.png

Thanks for the help Melon! :transport:

« Last Edit: February 13, 2023 @846.32 by LittleGr33nIMP » Logged

Oh look it's some turtles with my butto-HEY WAIT GET BACK HERE!

🐢🐢 https://i.imgur.com/gq4zUni.gif 🐢🐢

https://i.imgur.com/crdMKx0.jpg
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
Editor Recent Edits Tenement Arcade Arcade Link Land → Forum Art Hub Chat Webring Want to Login or Join ? Web Craft Guide Graphic Catalogue Wiki Newsletters Image Stream Zap!
Minecraft: Online
Join: craft.melonking.net