Hi,

No matter what I try


<style>
.FlexColumn {display: flex;flex-flow: column nowrap }
</style>

<div class="FlexColumn">
	<div>X</div>
	<div>X</div>
	<div>X</div>
	<div>X</div>
	<div>X</div>
</div>
<!-- I tried many CSS trick here... -->
<div>
   <span>X</span><br><span>X</span><br><span>X</span><br><span>X</span>
</div>

I always get a vertical gap between the characters !

Any ideas ?

Thanks.

  • SpongeB0B@programming.devOP
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    4 months ago

    ok I’ve found a work around

    <style>
    .FlexColumn {display: flex;flex-flow: column nowrap }
    .FlexColumn > div {display: inline-block; margin: -4px 0}
    </style>
    
    <div class="FlexColumn">
    	<div>X</div>
    	<div>X</div>
    	<div>X</div>
    	<div>X</div>
    	<div>X</div>
    </div>
    

    But if someone have something more proper, I’m all ears.

    • dohpaz42@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 months ago

      My two cents: if you have to resort to negative numbers, it’s time to rethink things. It may work, but it’s kludgy and most likely not easily scalable. Take the extra effort and find the better (more correct) way to manage this issue. Not only will it be correct, and scalable, but I’m sure you’ll learn a lot along the way. It really is a win-win when you take your time. 😊