Jump to content

Can't center text - it’s neither a flex container nor a grid container.


LeonLatex

Recommended Posts

I can't figure this puzzle out. I have tried most things throughout the night, but I have not set up this DIV as either a FLEX CONTAINER or a GRID CONTAINER. So, I tried to do that too, but it wasn't working. Do I have to place it in some special place in the CSS code? So, what will work here to align the text and content in this menu bar in center position? Everything is on one line too.

I would appreciate it if someone could show me where to put it?
 

<body class="body">

<div class="menu_div">Menu items</div>

div.menu_div {
    margin-top: 10px;
    background-color: #ffffff;
    position: fixed;
    box-sizing: border-box;
    overflow: hidden;
    height: 35px;
    width: 100%;
    top: 83px;
    left: 0px;
    border-bottom: thin solid #033333;
}

 

Edited by LeonLatex
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.