How to make body background on the side

Discussion in 'CSS' started by macaela, Feb 1, 2012.

  1. #1
    Hi can someone help me i've been trying to make a body background to display on the side of my main div i want my images to display like the iphone images displaying on the side of this site http://www.thesun.co.uk/sol/homepage/
     
    macaela, Feb 1, 2012 IP
  2. maureeeteeeee

    maureeeteeeee Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    2
    Trophy Points:
    41
    #2
    Those are fixed background images, to do so:

    
    #mybox {
     width: 100%;
     background: url (urltofile) top left no-repeat fixed;
    }
    
    Code (markup):
     
    maureeeteeeee, Feb 1, 2012 IP
  3. wiicker95

    wiicker95 Well-Known Member

    Messages:
    438
    Likes Received:
    37
    Best Answers:
    10
    Trophy Points:
    100
    #3
    That background:url property is not valid. You mustn't put a space between "url" and "(".
     
    wiicker95, Feb 1, 2012 IP
  4. maureeeteeeee

    maureeeteeeee Member

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    2
    Trophy Points:
    41
    #4
    That's true, my bad, a typo :p

    Still, remove that space and that's it ! :)
     
    maureeeteeeee, Feb 2, 2012 IP
  5. vmprotect

    vmprotect Greenhorn

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #5
    A number of properties involved in the manipulation of background body, but most of the time this code is preferred :

    body {
    background: white url(PATH of FILE) no-repeat top right;
    }
     
    vmprotect, Feb 2, 2012 IP