1

I'm having an issue aligning a relative inline-block with a few inline-blocks in the same row that are not relative. Picture for clarity: enter image description here

I've tried a few things (padding-top, margin-top) to get the guy to move down a little to no success.

Relavant HTML:

     <div class="course-item" ng-repeat="course in courses">
         <div class="course-title" ng-click="launchCourse(course.id)">{{course.title}}</div>
         <div class="course-grade" ng-click="launchGradebook(course.id)"><div class="course-grade-pop">{{course.grade}}</div></div>
         <div class="course-atten">{{course.attendance}}</div> <br />
     </div>

Relevant CSS:

.course-item
{
    margin-top: 15px;
    font-size: 14pt;
    line-height: 40px;
}
.course-title
{
    display: inline-block;
    cursor: pointer;
    text-align: left;
    text-overflow: ellipsis;
    width: 60%;
    background-color: #EEE;
    border-radius: 4px;
    padding-left: 6px;
}
.course-grade
{
    position:relative;
    display: inline-block;
    cursor: pointer;
    text-align: center;
    font-size: 15pt;
    width: 18%;
    height: 40px;
    padding-top: 10px;
    background-color: #EEE;
    border-radius: 4px;
    margin-left: 2%;
}
.course-atten
{
    display: inline-block;
    text-align: center;
    font-size: 15pt;
    width: 18%;
    background-color: #EEE;
    border-radius: 4px;
    margin-left: 2%;
}
.course-grade-pop
{
    position: absolute;
    top: 0px;
    left: 0px;
    height: 100%;
    width: 100%;
    border-radius: 4px;
}

Any idea of how to get the block to sit down on the same line as the others?

Valevalorin
  • 390
  • 1
  • 3
  • 18

1 Answers1

1

you can fix this by simply adding vertical-align:bottom to your .course-grade

dippas
  • 58,591
  • 15
  • 114
  • 126