change the height of ui.bootstrap.alert

11,370

You will need to change line-height and padding for this to work

.alert {
  margin-bottom: 1px;
  height: 30px;
  line-height:30px;
  padding:0px 15px;
}

http://codepen.io/nilestanner/pen/kkGoNO

Share:
11,370

Related videos on Youtube

Hanks
Author by

Hanks

Updated on June 04, 2022

Comments

  • Hanks
    Hanks almost 2 years

    I'm trying to add ui.bootstrap.alert based on this example: https://plnkr.co/edit/?p=preview.

    It works okay as following except that it's too big for me. enter image description here

    So I changed the height in CSS and here's the new output

    .alert {
      margin-bottom: 1px;
      height: 30px;
    }
    

    enter image description here But now the sentance is not in the middle of the alert anymore.

    How can I properly change the height of the alert? Thanks!

    • Marwelln
      Marwelln over 7 years
      Change line-height to 30 as well.
    • Niles Tanner
      Niles Tanner over 7 years
      plunker link is no good
  • Hanks
    Hanks over 7 years
    Works great! Thanks!