0

I have a sandbox below. I have set the width of the sidebar to be fixed. I'm trying to make it so that the menu text is below the icon however the text doesn't seem to appear at all when I try to wrap it with div or span.

Would I need to have a flex container?

      <Menu.Item key="1" style={{ height: 80 }}>
      <div style={{height: 80, display: "flex", textAlign: "center"}}>
        <Icon type="pie-chart" />
        <span>Option 1</span>
        </div>
      </Menu.Item>

Edit upbeat-mirzakhani-hhm7v

.

How can I successfully achieve below layout?

Freddy.
  • 1,593
  • 2
  • 20
  • 32

3 Answers3

0

Similar is already tried and shown here below Link : How do I add Add text below font awesome icon Links? Check if solution helps to you with HTML+CSS trick

Monika Kumbhar
  • 45
  • 2
  • 12
0
<Menu.Item key="1" style={{ min-height: 80 }}>
   <div style={{min-height: 80, height: "auto", display: "flex", textAlign: "center"}}>
      <Icon type="pie-chart" style={{display: "block"}}>/>
      <span>Option 1</span>
   </div>
</Menu.Item>
Maf
  • 696
  • 1
  • 8
  • 23
0

RESULT:

enter image description here

Change width value to something greater than 74 like 200.

enter image description here

Wilson
  • 9,006
  • 3
  • 42
  • 46