I can't vertically align element to bottom

user1186050

I added some code to verticaly align to bottom some td element (fullcalendar event) inside a table. Here is my original post. I added the necessary code from the answers given and everything aligned at the bottom. Now I want another element (multiple event link) to align to the bottom as well, but in the develoer tools it's showing a line through the css and it's still aligned in the middle. What I would like is the eventLimit (class=fc-more-cell) in the day cell to be aligned on the bottom of the day, just like a single event is aligned at the bottom. Picture posted below. Here is my fiddle link

$(document).ready(function() {

    // page is now ready, initialize the calendar...
    var eventsArray = [
            {
                title: 'Test1',
                start: new Date()
            },
            {
                title: 'Test2',
                start: new Date("2015-04-21")
            },
            {
                title: 'Test3',
                start: new Date("2015-04-21")
            }
        ];

    $('#calendar').fullCalendar({
        // put your options and callbacks here
        header: {
            left: 'prev,next', //today',
            center: 'title',
            right: ''
        },
        defaultView: 'month',
        editable: true,
        allDaySlot: false,
        selectable: true,
        events: eventsArray,
        eventLimit: 1
    })

});
.fc-event {
    border-radius: 0;
}

.fc-row .fc-content-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.fc-content-skeleton table {
    height: 100%
}

.fc-content-skeleton .fc-event-container {
    vertical-align: bottom;
}

.fc-more-cell {
    vertical-align: bottom;
}

a.fc-more {
    position: relative;
    display: block;
    font-size: 0.85em;
    line-height: 1.3;
    border-radius: 3px;
    border: 1px solid #3a87ad;
    background-color: #3a87ad;
    font-weight: normal;
    color: #fff;
    border-radius: 0;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.css" rel="stylesheet"/>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.js"></script>


<div style="border:solid 2px red;">
    <div id='calendar'></div>
</div>

Here is what the element looks like in dev tools. You can see that .fc-more-cell has it's contents with a line through it. enter image description here

Michal

The line through the CSS property in the developer tools means that setting was overridden. You can see that vertical-align: top is set with more specific CSS a few lines above. To fix that, your fc-more-cell selector needs to more specifically identify the element. Adding the td works in my testing:

td.fc-more-cell {
  vertical-align: bottom;
}

CSS, as in Cascading Style Sheets, applies properties based on the specificity of the CSS selector. More specific = more important.

Another thing - that specific element gets a rowspan="1" in the HTML. If you want it to be truly on the bottom of the day, that needs to be set to rowspan="2". That looks to be set by the library you are using. Unless it can be configured within that library, you will have to set that with JavaScript at the bottom of your document.ready block:

$('td.fc-more-cell').attr('rowspan', 2);

Working fiddle: https://jsfiddle.net/4v65ggos/25/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I vertically align the content of a grid element in bootstrap 3?

From Dev

Can I use vertical align to position text at the bottom of an ancestor element?

From Dev

How to align vertically an element to the bottom within a bootstrap column?

From Dev

Can't vertically-align in a div

From Dev

How can I align components in a JFrame vertically?

From Dev

How can I vertically align this navigation bar?

From Dev

Bootstrap: align element to bottom doesn't work

From Dev

Vertically align product images with bottom

From Dev

vertically align for floated element

From Dev

Vertically align list element

From Dev

Vertically align a floated element

From Dev

vertically align for floated element

From Dev

vertically align floated element

From Dev

Can't get text to align to bottom

From Dev

Can't get text to align to bottom

From Dev

How can I align an Include at the bottom?

From Java

Align an element to bottom with flexbox

From Dev

Jquery UI tabs at bottom, i can't align the arrow for active tab

From Dev

Can't get Bootstrap list item contents to align vertically properly

From Dev

Can't vertically align ul within li in nav

From Dev

Can't vertically align H1 (prefixed hack not working)

From Dev

can't align text vertically - angularJS + bootstrap + flexbox

From Dev

How can I vertically align elements in a header without tables?

From Dev

How can I vertically align my status bar item text?

From Dev

Can I adjust command line output to make columns vertically align?

From Dev

How can I vertically align my status bar item text?

From Dev

Can I vertically align images within a marquee tag

From Dev

As I can align text vertically within each caption?

From Dev

How can I vertically align a div without giving the height of the screen?

Related Related

  1. 1

    How can I vertically align the content of a grid element in bootstrap 3?

  2. 2

    Can I use vertical align to position text at the bottom of an ancestor element?

  3. 3

    How to align vertically an element to the bottom within a bootstrap column?

  4. 4

    Can't vertically-align in a div

  5. 5

    How can I align components in a JFrame vertically?

  6. 6

    How can I vertically align this navigation bar?

  7. 7

    Bootstrap: align element to bottom doesn't work

  8. 8

    Vertically align product images with bottom

  9. 9

    vertically align for floated element

  10. 10

    Vertically align list element

  11. 11

    Vertically align a floated element

  12. 12

    vertically align for floated element

  13. 13

    vertically align floated element

  14. 14

    Can't get text to align to bottom

  15. 15

    Can't get text to align to bottom

  16. 16

    How can I align an Include at the bottom?

  17. 17

    Align an element to bottom with flexbox

  18. 18

    Jquery UI tabs at bottom, i can't align the arrow for active tab

  19. 19

    Can't get Bootstrap list item contents to align vertically properly

  20. 20

    Can't vertically align ul within li in nav

  21. 21

    Can't vertically align H1 (prefixed hack not working)

  22. 22

    can't align text vertically - angularJS + bootstrap + flexbox

  23. 23

    How can I vertically align elements in a header without tables?

  24. 24

    How can I vertically align my status bar item text?

  25. 25

    Can I adjust command line output to make columns vertically align?

  26. 26

    How can I vertically align my status bar item text?

  27. 27

    Can I vertically align images within a marquee tag

  28. 28

    As I can align text vertically within each caption?

  29. 29

    How can I vertically align a div without giving the height of the screen?

HotTag

Archive