简体   繁体   中英

Columns with 1 pixel height

I am using the Gumby framework grid and am having a problem with the columns. I have the following code:

<div class="row appointment-container"> 
    <div class="columns one">
        <img class="appt-calendar" src="appt.png">
    </div>

    <div class="columns eight">
        <div id="last-appointment">
            <h4 class="confirm-appointment next-block">
                <span class="appt-text">Lorem ipsum intellectus testus integer string float test test test</span>
            </h4>
        </div>
    </div>

    <div class="columns three">
    </div>
</div>

With the following SCSS:

.appointment-container {

  position: relative;

  .appt-calendar {
    max-height: 100%;
    max-width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
  }
}

The "columns eight" and "columns three" display correctly but the "columns one" has a height of only one pixel despite having content in it. What would cause this to happen?

It seems that

position:absolute

on the image caused the column to collapse to 1 pixel. I do not know if this is something only Gumby has or if other frameworks have the same framework but I will update this answer once I find out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM