WEB how to place png furthest most right of wrapper for all resolutions?

Discussion in 'OT Technology' started by pharmokan, Mar 2, 2010.

  1. pharmokan

    pharmokan OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    102,103
    Likes Received:
    406
    Location:
    L.A.
    i have this tassel

    [​IMG]

    and i want to make it hang right, at a certain position no matter the resolution of the user. i know javascript is 1 answer, getting document window width, and using a simple math formula to determine the tassels css right value, but if the user resizes the window, the tassel will begin to go out of place.

    is there an alternative to making a png stay still? do i have to use tables with spacers for this?

    i hope not :(
     
  2. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,915
    Likes Received:
    8
    Location:
    Los Angeles
    There are several ways you can do it. Multiple divisions with background attributes layering on top of each other can give you that effect. If you've already done the work though, I probably would just position relative the parent container and position the tassels absolutely top right.

    Code:
    #parent { 
      position: relative;
    }
    #tassles {
      top: 0; 
      right: 0;
      position: absolute;
    }
    
    <div id="parent">
      <div id="tassels" />
    </div>
    
    If your body tag is the parent element, then you can still implement #tassels the same way.
     
  3. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    float:right
     
  4. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,915
    Likes Received:
    8
    Location:
    Los Angeles
    No, that will conflict with relational elements.
     
  5. pharmokan

    pharmokan OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    102,103
    Likes Received:
    406
    Location:
    L.A.
    KINGTOAD > *
     
  6. pharmokan

    pharmokan OT Supporter

    Joined:
    Oct 18, 2002
    Messages:
    102,103
    Likes Received:
    406
    Location:
    L.A.
    i didnt think solution would be that simple

    :bowdown:
     

Share This Page