+ Reply to Thread
Results 1 to 5 of 5

Thread: web page background( how to )

  1. #1
    divebuddha is offline x10Hosting Member divebuddha is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    56

    web page background( how to )

    hi there guys

    just a quick one that may sound a little daft but wondered how do i apply a picture or a graphic or picture as a web template background

    basicaly my web sites template has a grey background and wondered how to apply a pic to add some colour

    or is there another way to do it ?

    any info would be greatfully recieved

    and if anyone would like a look at the site to get an idea what im after the link is below?

    basicaly want to take away the grey and add a pic instead

    http://divebuddha.x10hosting.com/
    Last edited by divebuddha; 12-19-2009 at 04:42 AM.

  2. #2
    walidno1 is offline x10 Lieutenant walidno1 is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    Bangladesh
    Posts
    339

    Re: web page background( how to )

    so, instead of using the grey colour u want a background image??

    use this code:

    body {
    background-image: url(file:///D|/Website/Images/Page-BgTexture.jpg);
    background-repeat: no-repeat;
    }

    -----------------------
    using repeat (repeats both in y and x axis), repeat-x (x axis) and repeat-y (y axis), u can fill ur background (depends on ur background image). If the image is large enough then use no-repeat....if not, use the appropriate value........btw, I recommend using pic with small dimension as it enables faster loading and u can reproduce the same image using the repeat function..........

    Hope it helps
    Edit:
    Quote Originally Posted by walidno1 View Post
    so, instead of using the grey colour u want a background image??

    use this code:

    body {
    background-image: url(file:///D|/Website/Images/Page-BgTexture.jpg);
    background-repeat: no-repeat;
    }
    btw, url(file:///D|/Website/Images/Page-BgTexture.jpg) means the directory of ur file.........so, u probably have to change this
    Last edited by walidno1; 12-19-2009 at 05:14 AM. Reason: Automerged Doublepost
    visit my website as a sign of appreciation :D
    Get professional logos designed

    link:http://www.myriad.x10hosting.com

  3. #3
    divebuddha is offline x10Hosting Member divebuddha is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    56

    Re: web page background( how to )

    Quote Originally Posted by walidno1 View Post
    so, instead of using the grey colour u want a background image??

    use this code:

    body {
    background-image: url(file:///D|/Website/Images/Page-BgTexture.jpg);
    background-repeat: no-repeat;
    }

    -----------------------
    using repeat (repeats both in y and x axis), repeat-x (x axis) and repeat-y (y axis), u can fill ur background (depends on ur background image). If the image is large enough then use no-repeat....if not, use the appropriate value........btw, I recommend using pic with small dimension as it enables faster loading and u can reproduce the same image using the repeat function..........

    Hope it helps
    Edit:


    btw, url(file:///D|/Website/Images/Page-BgTexture.jpg) means the directory of ur file.........so, u probably have to change this
    thanks for that friend its much appreciated

    not saying that i understand exactly where to putthe image though so will have to play with it and try it out

    but a good idea using a smaller image and making it repeat ?

    is there any specific kind of images that work well in template backgrounds?
    Last edited by divebuddha; 12-19-2009 at 08:48 AM.

  4. #4
    farscapeone's Avatar
    farscapeone is offline Community Advocate farscapeone is on a distinguished road
    Join Date
    Dec 2008
    Location
    Србија (Serbia)
    Posts
    1,166

    Re: web page background( how to )

    You can eather use absolute or relative path to specify your image location.

    Absolute path is a full path like www.example.com/images/some_image.png.

    Relative path refers to a location relative to the page where you specified your background css image. So if you have a css file like www.example.com/default.css and image like www.example.com/images/some_image.png the relative path of your image would be images/some_image.png.

    As for the image format I like to use PNG but cos it's samll yet preserves the quality better then JPG. This is only true when using backgrounds with no details (like gradients) but if you want to put some extra detail into it JPG is the way to go. The only thing you have to think about is how big your background image is and use the format and compression that gives the best size-quality ration.

  5. #5
    divebuddha is offline x10Hosting Member divebuddha is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    56

    Re: web page background( how to )

    oo i tried the code and works fine i just need to find a background pic that gives it a bit more colour whist preserving the loading time and not making it too heavy on loading?

    bit hard when it repeats getting the pic to look similar when they both join in the middle?:cool:

+ Reply to Thread

Similar Threads

  1. [OFF] [100 points] Joomla template porting
    By neverlate2day in forum The Marketplace
    Replies: 4
    Last Post: 09-23-2009, 12:09 PM
  2. Use PHP to add Content to page through Admin
    By goldy30 in forum Programming Help
    Replies: 1
    Last Post: 11-13-2008, 12:13 AM
  3. Unique php page
    By bunglebrown in forum Programming Help
    Replies: 48
    Last Post: 11-08-2008, 09:59 AM
  4. Replies: 0
    Last Post: 10-19-2008, 10:40 PM
  5. Passing variables from page to page
    By os242 in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 09-15-2007, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers