1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

BackGround positioning ...

Discussion in 'CSS' started by contiw, Nov 18, 2005.

  1. #1
    I have a <div id="container" class="container> with an height of 462 pixels and a background image of 480. Need to position the background so that the bottom is visible and the top is clipped.
    .container {height:462px;
    width:640px;
    border:0px solid #707070;
    border:1px solid white;
    background-position:top; //bottom
    }

    The background image is set dynamically with
    timer1 = setTimeout("document.getElementById('container').style.background = imgUrl",1300);

    because it is coming every so many seconds from a webcam somewhere else on the net.

    Please see "http://wconti.com/start.cfm".
    Thank You for helping.
    Walter Conti
     
    contiw, Nov 18, 2005 IP
  2. dj1471

    dj1471 Well-Known Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #2
    This might do it:
    
    top: -18px;
    
    Code (css):
    If that doesn't work, try:
    
    bottom: 0px;
    
    Code (css):
     
    dj1471, Nov 18, 2005 IP
  3. draculus

    draculus Peon

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    background-position does not take "top" or "bottom" as arguments. It takes two values representing the horizontal and vertical offset.

    You would need:

    background-position: 0 -18px;
     
    draculus, Nov 19, 2005 IP