How to design a site with a background image?

Discussion in 'CSS' started by prince718, Jul 9, 2011.

  1. #1
    Hello. I want to design a site(most likely w/ a 960 or so(maybe smaller) width), and have a background image like the one on this site 7days7nights.com ... How do I do that? ALLLLLL Suggestions And Recommendations appreciated!!!
     
    prince718, Jul 9, 2011 IP
  2. pupul

    pupul Prominent Member

    Messages:
    1,737
    Likes Received:
    66
    Best Answers:
    2
    Trophy Points:
    340
    #2
    Using HTML code for background. But if you use large image as background it will load slowly.
    So we use CSS for repeating a image for the total website. So that it will load faster.
     
    pupul, Jul 9, 2011 IP
    prince718 likes this.
  3. akshat.gl

    akshat.gl Member

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    For the main background add this to css :
    body{
    background: url('main_bg.jpg') fixed #000;
    }
    For the box background, create a 5X5 px image and try using a brush of size 2px and create a random pattern. Then use the following code in css :
    box{
    background: url(bg_box.jpg) #000 repeat;
    }
     
    akshat.gl, Jul 9, 2011 IP