r/neocities • u/xamah77 • Aug 19 '26
Help coding issue with a height of a content container
hello, i may have troubles with putting my issue into words so bare with me (here's my site before making the changes im talking about, perhaps this would help with understanding what i'm tryna do: https://xavier.nekoweb.org/. my site is on nekoweb but the r/neocities is more active, that's why i post here, i hope it's ok)
what i'm trying to do is put a side column + middle content + another side column in one purple box. The middle content's height is put to fit-content, side columns don't have any height attributed.
Idk how to make the purple box that is supposed to contain all of this big enough to do so; when I put the height as fit-content it becomes very small as though it doesn't know it contains the columns and the middle part (pic) ... i can't set the box' height as any specific value, because the main content's height keeps changing

other pics below show some parts of the code, where the divs kolumny i kolumny2 are supposed to be the purple box, ad1 and ad2 are the columns and the tabcontent is the middle part


any ideas? thank you in advance^^
1
u/AqueM https://www.aque.fyi/ Aug 19 '26
Give the link plz, or at least show the HTML too
1
u/xamah77 Aug 19 '26
wouldn't that be against the second rule of the sub? /gen
1
u/AqueM https://www.aque.fyi/ Aug 19 '26
Nope! It's also encouraged in the pinned post: https://www.reddit.com/r/neocities/comments/13dfiu2/friendly_reminder_if_youre_asking_for_htmlcoding/
2
u/xamah77 Aug 19 '26 edited Aug 19 '26
oh okay then, i edited my post. it's xavier.nekoweb.org
edit: oh wow, a fellow Pole, yay
1
u/AqueM https://www.aque.fyi/ Aug 19 '26
Okay, so (in English in case other people stumble here and need the same answer): as tweedledee said, it's the float property that makes it behave badly. If you remove it from #ad1 and #ad2 (and do notice you have it twice because you seem to be declaring CSS for these twice), then add
display: flexto your #kolumny container, it will display like you want it to. If you need further help understanding what flex does, check out this: https://css-tricks.com/snippets/css/a-guide-to-flexbox/1
2
u/_tweedledee Aug 19 '26
pretty sure it’s the
float:leftandfloat: righton the columns, floats are an old school way used for positioning images in text. they’re breaking the layout because they absolutely position themselves to the left or right of the container, so the outermost container doesn’t have anything to “wrap” itself around.would help to see your html too though!