Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS DIV keep on moving inside table cell

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43801
    azhanmohdyusoff
    Participant

    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](https://www.dropbox.com/s/cl1k6ly26udj6f4/CSS_DIV.pnghttps://www.dropbox.com/s/cl1k6ly26udj6f4/CSS_DIV.png”)

    here’s the DIV’s css style

    div.day-number
    {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

    .**

    Thanks
    Azhan

    #130260
    daffy58
    Participant

    try to set vertical-align:top for td tag

    #130277
    azhanmohdyusoff
    Participant

    thanks daffy, it really works! :)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.