0

The site works properly on Chrome and Edge, but is squished on Firefox and Safari.

Here is a working JSFiddle

Here is a picture showing comparison between top - Safari and bottom - Chrome. It is supposed to look like the bottom one. http://imgur.com/7fmjEG5.

.spell span {
    position: relative;
    top: 25%;
}
.note {
    clear: both;
}
.spell {
    text-align: center;
    max-width: 100%;
    height: 35px;
    background-color: #E7E7E7;
}
.BUFF {
    background-color: #80DE57;
}
.NERF {
    background-color: #DE5B54;
}
.CHANGE {
    background-color: #D2A557;
}
.NEW {
    background-color: #50B9EB;
}
.BUGFIX {
    background-color: rgb(141, 141, 141);
}
.change_icon {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
    color: white;
    vertical-align: middle;
    text-align: center;
    min-width: 70px;
    height: 100%;
    display: table-cell;
}
<div class="note">
    <div class="spell"> <span class="spelliconwithtitle">text</span>

    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; min-height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell; ">test</p>
        <div class="change_icon BUFF">text</div>
    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; min-height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell; ">test</p>
        <div class="change_icon NERF">nerf</div>
    </div>
</div>
TylerH
  • 20,799
  • 66
  • 75
  • 101
Higeath
  • 3
  • 2

2 Answers2

2

min-height doesn't work on tables.

You will have to replace it with height

.spell span {
    position: relative;
    top: 25%;
}
.note {
    clear: both;
}
.spell {
    text-align: center;
    max-width: 100%;
    height: 35px;
    background-color: #E7E7E7;
}
.BUFF {
    background-color: #80DE57;
}
.NERF {
    background-color: #DE5B54;
}
.CHANGE {
    background-color: #D2A557;
}
.NEW {
    background-color: #50B9EB;
}
.BUGFIX {
    background-color: rgb(141, 141, 141);
}
.change_icon {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
    color: white;
    vertical-align: middle;
    text-align: center;
    min-width: 70px;
    height: 100%;
    display: table-cell;
}
<div class="note">
    <div class="spell"> <span class="spelliconwithtitle">text</span>

    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell;height: 41px; ">test</p>
        <div class="change_icon BUFF">text</div>
    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell; height: 41px;">test</p>
        <div class="change_icon NERF">nerf</div>
    </div>
</div>
Aaron
  • 10,187
  • 3
  • 23
  • 39
  • well now it doesn't work properly on chrome should I keep both min-height: 41px; and height:41px; that seems to be working – Higeath Sep 14 '15 at 15:50
  • Ive updated my answer, you will need to add the height to the `table-cell` element for chrome! – Aaron Sep 14 '15 at 15:53
0

For diversity:

Instead of height you can use line-height on the elements.

.spell span {
    position: relative;
    top: 25%;
}
.note {
    clear: both;
}
.spell {
    text-align: center;
    max-width: 100%;
    height: 35px;
    background-color: #E7E7E7;
}
.BUFF {
    background-color: #80DE57;
}
.NERF {
    background-color: #DE5B54;
}
.CHANGE {
    background-color: #D2A557;
}
.NEW {
    background-color: #50B9EB;
}
.BUGFIX {
    background-color: rgb(141, 141, 141);
}
.change_icon {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
    color: white;
    vertical-align: middle;
    text-align: center;
    min-width: 70px;
    height: 100%;
    display: table-cell;
}
<div class="note">
    <div class="spell"> <span class="spelliconwithtitle">text</span>

    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; min-height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell; line-height: 41px; ">test</p>
        <div class="change_icon BUFF">text</div>
    </div>
    <hr style="margin: 0; padding: 0;">
    <div style="overflow: auto;width: 100%; min-height: 41px; max-height: 100%; position: relative; display: table; ">
        <p style="padding: 0px 5px 0px 5px;width: 100%;margin: 0 1% 0 1%;display: table-cell; line-height: 41px; ">test</p>
        <div class="change_icon NERF">nerf</div>
    </div>
</div>
Joel Almeida
  • 7,939
  • 5
  • 25
  • 51