css - Navbar links should be all tall like the taller one -


itemprop = "text">

I have a navigation bar with 4 links.

While the width of each is 25%, the total width of the NAV is not fixed because the text of a link can be longer than the others and, like in the 2 rows, like Could stay.

  # first-level-navigation .mega-link {background: linear-gradient (180deg, #ffffff 0%, #ffffff 60%, # EEEEe 100%) Dual Scrolls 0 RGBA ( 0, 0, 0, 0); Limit: 1px solid #cccccc; Padding: 0; Text-transform: uppercase; Width: 25%; } # First-Level Navigation .mega-link a {color: # 00643c; Display: Inline-block; Padding: 10px; Text align: center; Text-decoration: None; Width: 100%; }   

I think the height of the small link will increase in my case to a tall height, in which the last line will be on 2 rows if the window is small how can it be obtained, High strength in PX? I tried with height: 100% but it was inappropriate

You can use Display: Table / Table-Cell :

  # First-Level-Navigation {Display: Table; } .mega-link {display: table-cell; Vertical-align: medium; }   

Like, you must add browser prefixes to box-sizing: border-box -.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -