www.webdeveloper.com
Results 1 to 5 of 5

Thread: css BackGround

  1. #1
    Join Date
    Apr 2013
    Posts
    36

    css BackGround

    hi

    i have background width 1400px height 1700px


    the best solution is :

    background: url(img/bg.jpg);
    width: 1400px;
    height: 1700px;
    overflow: hidden;

    ?

    or is another way ?




    here is the image :

    http://s12.postimg.org/6ije0mqj1/image.jpg

  2. #2
    Join Date
    Sep 2013
    Posts
    9
    Change the background width and height in Photoshop / Painter, width and height does not effect a background this way.

  3. #3
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,214
    Do you need that width/height since the image you linked to is only 1279 x 1554 pixels? If not, just make the size the same as the background image:
    Code:
    selector_name {
    width: 1279px; min-height: 1554px;
    margin: 0 auto;
    background: url((img/bg.jpg) no-repeat center scroll;
    }
    Or, use CSS3 rules:
    Code:
    selector_name {
    background: url(bgimage.jpg) no-repeat center scroll;
    background-size: 100%;
    }
    For Firefox 3.6 (-moz-background-size) and Opera 10.0 (-o-background-size).

    More info here.

  4. #4
    Join Date
    Apr 2013
    Posts
    36
    thx

  5. #5
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,214
    You're very welcome.

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