Get a free trial // Grow your CSS skills // Land your dream job

DIV keep on moving inside table cell

  • # March 31, 2013 at 4:53 am

    Hi Guys,

    Lately im applying PHP calendar to display info on each day inside the calendar.
    There is small DIV on each day on top right inside each day inside the calendar.

    Whenever there is data fill up inside the day box,the DIV keep on moving relatively with the text.

    Here’s the image >>
    [Image from Dropbox]( “”)

    here’s the DIV’s css style
    {background:#999; padding:5px; color:#fff; font-weight:bold; float:right; margin:-5px -5px 0 0; width:20px; text-align:center;}

    Can somebody help me on **how to make the DIV always ON TOP RIGHT of each calendar table cell even there is text inside the .**


    # March 31, 2013 at 5:10 am

    try to set vertical-align:top for td tag

    # March 31, 2013 at 9:52 am

    thanks daffy, it really works! :)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed