Artifacts Gallery Guilds Search Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining?
May 26, 2026 - @79.22 (what is this?)
Activity rating: Three Stars Posts & Arts: 28/1k.beats Random | Recent Posts | Guild Recents
News: :skull: Websites are like whispers in the night  :skull: Guild Events: Spring Themed Projects

+  MelonLand Forum
|-+  Life & The Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  Best way to have a 2 column site?


« previous next »
Pages: [1] Print Embed
Author Topic: Best way to have a 2 column site?  (Read 4400 times)
Obspogon
Full Member ⚓︎
***
View Profile WWW


gamer
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: obspogon
iMood: Obspogon
Matrix: Chat!
XMPP: Chat!

Guild Memberships:
Artifacts:
First 1000 Members!OG! Joined 2021!
« on: November 21, 2021 @798.13 » Embed

I want to have a homepage with 2 columns of unequal width but the same height.
Logged

----------------------
https://obspogon.neocities.org/
----------------------
https://card.exophase.com/2/0/272714.png?1737474560
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:
Flinstone VitaminAlways working hard!Known Apple shillcoolest melon on the web!Emergency feel-good teaa silly heart 4 melon :)
« Reply #1 on: November 21, 2021 @813.16 » Embed

The new school way would be to use flex, although that's designed for sites that have dynamic width.
Which you can read about here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/

If you wanna do it the old way you can make both columns float left, then set a fixed width for each (you can also do a % width for dynamic sizing)

Something like: Untested sample code to give an idea, may not directly work! This will create 2 columns that should always be 100% the height of the wrapper, so in theory as the wrapper expands, so will both columns.

Code

<div id="wrapper">
 <div id="col-a"></div>
 <div id="col-b"></div>
</div>

#wrapper {
 width: 700px;
 margin: 0px auto 0px auto;
}

#col-a, #col-b {
 float: left;
 height: 100%;
}

#col-a {
 width: 200px;
}

#col-b {
 width: 500px;
}

Logged


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

Artifact Swap: Wildflowers!smoldiamundbitsy catPeeperold-timey tunes~♪SquidwardRed TulipMellohiDSiInternetPoochI seek you!I met Dan Q on Melonland!?Stinky CheeseFlowersOpalLasagnaHyperactive DonutEvil fucking snail
Obspogon
Full Member ⚓︎
***
View Profile WWW


gamer
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: obspogon
iMood: Obspogon
Matrix: Chat!
XMPP: Chat!

Guild Memberships:
Artifacts:
First 1000 Members!OG! Joined 2021!
« Reply #2 on: November 21, 2021 @967.45 » Embed

Used the flex method and it works now. Thanks.
Logged

----------------------
https://obspogon.neocities.org/
----------------------
https://card.exophase.com/2/0/272714.png?1737474560
fLaMEd
Jr. Member ⚓︎
**
View Profile WWW

⛺︎ My Room

Artifacts:
First 1000 Members!OG! Joined 2021!
« Reply #3 on: February 13, 2023 @208.53 » Embed

If you wanna do it the old way you can make both columns float left, then set a fixed width for each (you can also do a % width for dynamic sizing)

Scream/Lol, why would you want to do it the old way haha! 

Like going for a run with a weight vest :joy:
Logged
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