Offset?

Discussion in 'CSS' started by rockinaway, Apr 4, 2008.

  1. #1
    I have attached an image.

    The top half of the image shows my current header. The black box is what I want moving. Currently the header is contained within a table.

    The second half of the image shows what I want done. I want the black box to be to have an offset, so that it moves below the nav bar. I kind of want it to float over all the other stuff but at a lower height.

    Any help in how to do this?
     

    Attached Files:

    If someone posts a solution, use the "Best Answer" link in their post to pick it as the best answer.
    rockinaway, Apr 4, 2008 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    in the CSS for it:
    position:relative;
    top:10px; /* or however far */
    left:0;

    position:relative leaves the 'box' that is used to calculate 'flow' in it's existing spot, so this type of moving doesn't change the rest of the layout - but it does change where it is RENDERED. Usually one shouldn't use position:relative to move an item because it leaves the flow in place - in this case that's EXACTLY the behavior you want.
     
  3. rockinaway

    rockinaway Guest

    Best Answers:
    0
    #3
    No worries, it was a bit more complicated than that... but I sorted it out :) Thanks anyway :)