www.webdeveloper.com
Results 1 to 5 of 5

Thread: Help with background

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    3

    Help with background

    Hi guys, new to the forum and have a question

    I am a beginner at web design and I am in the process of developing my own website. I tried creating a background behind the website for the first time and was successful, but for some reason on the very ends of the page there is still a white border. Here is my website : http://stream4sports.com

    Here is my CSS code

    #wrapper {
    background: #595454;
    height:900px;
    width: 1080;
    }

    Is there way to make it automatically connect to all sides? if that made any sense haha. Any help would be greatly appreciated, thank you.

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,115
    I don't see the white border, but you may want to be sure you set the margin and padding to zero on the body and html elements.

    Code:
    html, body {margin: 0; padding: 0;}
    Also, you are setting width to 1080. You need to specify px, %, em, etc.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Oct 2012
    Posts
    3
    Thank you, I ended up finding the answer on search.. for anyone that has a similar problem I just used this in my CSS code and it stretched my background behind the site out.

    #wrapper {
    background: #595454;
    position:fixed;
    top:0;
    left:0;
    /* Preserve aspet ratio */
    min-width:100%;
    min-height:100%;
    }

  4. #4
    Join Date
    Aug 2012
    Location
    1453 Gingerwood ave, Milpitas CA 95035,
    Posts
    37
    By using the above code background will be connect to all sides????

  5. #5
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,208
    Alternatively for the 100% Background Image:

    http://www.cssplay.co.uk/layouts/background.html

    bgStretcher jQuery Plugin Allows to Add Background Image to Page and Proportionally Resize it to Fill Entire Window Area: http://www.ajaxblender.com/bgstretch...nd-plugin.html

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles