• When posting, please be aware that artistic nudity is still nudity and not allowed under RpNation rules. Please edit your pictures accordingly!

    Remember to credit artists when using work not your own.

Help A way to arrange images in a row that scales to width

Sludge

-
Roleplay Availability
Roleplay Type(s)
My Interest Check
Hi! Can someone help me figure out how to arrange images horizontally, but in a way that scales their width to fill up the entire div? This should be simple but its been a while since I've used bbcode here and none of my old code works.

Ideally I'm looking for a simple snippet I can paste images into without setting the percentages manually, like this:

KTF1Nqq.png
 
Ok so I have no idea what Im doing but I managed to get something working ^^. There is probably a better way to do this but I'm leaving the code below in case anyone needs it.

Should look the same on any screen size with any number of images as long as you put a separate HEIGHTRSTRICT tag on each image. It's just a nice way to quickly drop several pictures in a post while staying mobile friendly.

c409d7287168e90cf3b12141a9409ed0.jpg
25ab627efea703d48c4ab01838f5aa44.jpg
f9154c25e4ce3a10c80e41542ef841c7.jpg
1835351a27c546258c454769e8fb872b.jpg


Code:
[nobr]
[div=display:flex; flex-direction: row; flex-wrap: nowrap; justify-content: center]

[HEIGHTRESTRICT=200]
[IMG]https://i.pinimg.com/564x/c4/09/d7/c409d7287168e90cf3b12141a9409ed0.jpg[/IMG]
[/HEIGHTRESTRICT]

[HEIGHTRESTRICT=200]
[IMG]https://i.pinimg.com/564x/25/ab/62/25ab627efea703d48c4ab01838f5aa44.jpg[/IMG]
[/HEIGHTRESTRICT]

[HEIGHTRESTRICT=200]
[IMG]https://i.pinimg.com/564x/f9/15/4c/f9154c25e4ce3a10c80e41542ef841c7.jpg[/IMG]
[/HEIGHTRESTRICT]

[HEIGHTRESTRICT=200]
[IMG]https://i.pinimg.com/564x/18/35/35/1835351a27c546258c454769e8fb872b.jpg[/IMG]
[/HEIGHTRESTRICT]

[/div]
[/nobr]
 
Last edited:

Users who are viewing this thread

Back
Top