Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
September 06, 2026 - @275.83
Activity rating: Four Stars Posts & Arts: 55/1k.beats ~ Boop! The forum will close in 725.beats! Random | Recent Posts | Guild Recents
News: :happy: Open the all windows! Your mind needs storms and air! :happy: Guild Events: 10: window

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Images can tile and wrap to fit page width. Can other elements do that?


« previous next »
Pages: [1] Print Embed
Author Topic: Images can tile and wrap to fit page width. Can other elements do that?  (Read 1301 times)
IndigoGolem
Sr. Member ⚓︎
****
View Profile WWW


What's personal text?
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
squeezed gentlyVisited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Joined 2025!
« on: August 19, 2025 @889.58 » Embed

I'm making a trading card game kind of like Magic: The Gathering, and i have several web pages that should be filled with pictures of full cards, and text versions of the cards. This would be pretty easy if i just wanted images. <img> elements already do exactly what i want with how lines of them wrap to fit the screen, and if they're all the same size they'll tile into a nice grid.

However, i also want text versions of every card, for screen readers and people with slow internet connections. <details> might be a good way to do this, but those get put on their own lines instead of staying on the same line.

<nobr> seems like it would work until the edge of the screen, when people would start having to scroll sideways to see more cards.

I could put everything in a table but the whole point of this question is that i don't want a fixed number of cells per row.

Adding the text as alt text to the images and scrapping <details> would work, but not well unless there's a way to have formatting there. At least a line break.

In short, i need to make a bunch of <details> elements with images as the summaries display on the same line but still wrap at the end of the screen. How can i? I'm open to using CSS, i just prefer to avoid it where HTML works instead.

Logged

-Indigo, Anve Ozo

Artifact Swap: Mick Jagger's mouthCreampuffNoidWildflowers!2 coins
ribose
Sr. Member ⚓︎
****
View Profile WWWArt


⚘ ⚘ ⚘ ⚘ ⚘
⛺︎ My Room
iMood: ribose
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
Visited on Melon's 10th Anniversary!Learning to swim!Fio the HamsterAmmoniteSee A Bug Summer 2025 ParticipantFirst 1000 Members!
« Reply #1 on: August 19, 2025 @908.34 » Embed

a series of <img> elements will be placed on the same line because (by default) they are inline elements! <details> elements get placed on new lines because (by default) they are block elements! here's w3school's page on block and inline elements.

the defaults can be overridden with css! if you want, you could use
Code
details, summary {
  display: inline;
}
to make the details and summary elements display inline. they should still wrap at the end of the page.

Logged

https://camo.githubusercontent.com/491b9e205611e603fa426d303bef52528c10ba8b96d3139e39a2e38103e5c563/68747470733a2f2f7269626f2e7a6f6e652f38387833312f736974652f7269626f73652e706e67 https://camo.githubusercontent.com/54e6ab289e4df0e4e42c9c30c886d2d7c8df708686029a1f654e2930389454b4/68747470733a2f2f7269626f2e7a6f6e652f38387833312f6d696e652f76696577736f757263652e706e67 https://camo.githubusercontent.com/f5bfa6417506fb7531aa82818e33c1ab1277070812531c09638c5aca5d2ea164/68747470733a2f2f7269626f2e7a6f6e652f38387833312f6d696e652f7777772e706e67 https://camo.githubusercontent.com/f7d9283e2ad6924bc82c68b6bd1637dfe82b9baa6362247cee489c9f8723bed8/68747470733a2f2f7269626f2e7a6f6e652f38387833312f6d696e652f7465616c2e706e67 https://camo.githubusercontent.com/66b9d37563323d2962eccea0381ded1337d1d12652da870b82e8c40d5c2e0d54/68747470733a2f2f7269626f2e7a6f6e652f73756e6461792f666973682f726174686572626566697368696e2e706e67

Artifact Swap: <html>Useless nested <div>Sprout LeafCache the SquirrelPoochSonic the HedgehogKnuckles the EchidnaShadow the HedgehogE-102 GammaEmerlEggmanBall Creaturecinnamoroll gift
IndigoGolem
Sr. Member ⚓︎
****
View Profile WWW


What's personal text?
⛺︎ My Room
RSS: RSS

Guild Memberships:
Artifacts:
squeezed gentlyVisited on Melon's 10th Anniversary!I got robbed by Dan Q on Melonland!Joined 2025!
« Reply #2 on: August 21, 2025 @667.03 » Embed

the defaults can be overridden with css!

That is exactly what i was looking for. Thanks very much.

Logged

-Indigo, Anve Ozo

Artifact Swap: Mick Jagger's mouthCreampuffNoidWildflowers!2 coins
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 MelonLand Editor Recent Edits Tenement Arcade Want to Login or Join ? Forum Art Hub Chat Webring Web Guides Graphics Catalogue Wiki Newsletters Image Stream
Melon's Sites TamaNotchi Textures PixelSea GifyPet MoMG Ozwomp Online Loom Videos Leaky Webring Melonking
Tools Melon Software ArtHub Embed Maker ML Passports
Outlinks Frutiger Aero Forum Onio Club m15o's Web Services 32Bit Cafe iMood Webrings Internet Phone Book HTML Energy Declarations Hackers & Designers
Zap!
Minecraft: Online
Join: craft.melonking.net