Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #481
    dan
    Participant

    I have a code in CSS as follows. Problem is the div with id = ‘content’ wont center

    <div class=”justify-center”>
    <div class=”content”>
    </div>
    </div>

    #482

    You forgot to specify a flex class… You will have to specify it with flex if you want an horizontal main axis or flex col if you want a vertical main axis. For example if you want the div with id=’content’ to be vertically center you have to write as follows:

    <div class=”flex flex-col justify-center”>
    <div class=”content”>
    </div>
    </div>

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.