SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict tlacaelelrl's Avatar
    Join Date
    Apr 2011
    Location
    Mexico city, Mexico
    Posts
    353
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    position based on the size of a background

    if I have a div which has an image exactly 180 by 300 px, how can I position an element exactly at the bottom left corner of that div, having in mind that there is dynamic content which should not push this element
    if you go here
    you will see a calendar on the left, at the bottom of the calendar is an input field which takes the selected day, if you click on any day you will notice what it does, then if you go to the month of july 2011 you will notice that this input field will be pushed down, what I am trying to achieve is place it at the bottom left corner making sure that it is not pushed further down when someone scrolls through the calendar

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,367
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    You could place the input absolutely in the corner by setting position relative on the main parent.

    e.g.

    Code:
    div#calendar_container {
        position:relative;
    }
    input#date_selected {   
     bottom: 20px;
        left: 10px;
        position: absolute;
        text-align: center;
    
    
    }
    That should do what you want if I understand correctly.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •