#1
  1. No Profile Picture
    mrtesting
    Guest
    Devshed Newbie (0 - 499 posts)
    how to format a jpg file to fit as a body background image ?

    i am trying to put a image in the

    <body background="book.jpg">

    but the image appears only partially.
    The top left side since it's height is so tall appears and it also appears on the right.

    but the bottom side did not appear at all.

    what size shoud i put it as ?
  2. #2
  3. No Profile Picture
    Ranj
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi...when you use an image as the background for a page it gets tiled automatically. Thus in 640*480 you may see an image partially, while at 800*600 it may be centered but in larger windows it will get tiled.

    So design an image as well as the html page such that it fits exactly without having scroll bars etc.
  4. #3
  5. No Profile Picture
    Faz
    Guest
    Devshed Newbie (0 - 499 posts)
    Or better, create a little tile for your page. This pic will be of small size (2 kB)and it will create a solid background with no lines or white spaces.
    Don't create a page that is dependent on the user's screen resolution (or when you do, make a script that will redirect to the correct page according to the screen res).
    You can create a tile with e.g. Adobe Photoshop (filter -> other -> tile maker)
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Oslo, Norway
    Posts
    1
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by mrtesting:
    how to format a jpg file to fit as a body background image ?

    i am trying to put a image in the

    <body background="book.jpg">

    but the image appears only partially.
    The top left side since it's height is so tall appears and it also appears on the right.

    but the bottom side did not appear at all.

    what size shoud i put it as ?
    [/quote]

    Answer:

    Depends on the resolution on the screen of those who are watching it...
    Try to set your own screen resolution to 800x600 to be shure it is looking good also for those with that low resolution. Make the jpg as big as you want it, then add the following text in your HTML source (somewhere in between the <head> and </head>:

    <style>
    <!--
    BODY {background-image: url(book.jpg); background-repeat: no-repeat; }
    -->
    </style>

    Be shure to change the "book.jpg" -part with the name and path of your jpg, if it has another name (and another path)...

    Then your background jpg will show only once...

    Hope that helped you out.


    ------------------
    Pelt

Similar Threads

  1. Finding Images in HTML
    By beardo in forum PHP Development
    Replies: 14
    Last Post: March 28th, 2004, 07:29 AM
  2. Replies: 3
    Last Post: January 19th, 2004, 04:44 PM
  3. locate image file by ignoring case of file name
    By PHPme in forum PHP Development
    Replies: 8
    Last Post: April 3rd, 2003, 12:11 AM
  4. How to send emial with an image attach file
    By zerphp in forum PHP Development
    Replies: 7
    Last Post: May 21st, 2001, 11:09 AM
  5. Unable to print cell background image with data in cell
    By NickJohnson in forum HTML Programming
    Replies: 0
    Last Post: December 20th, 2000, 07:39 AM

IMN logo majestic logo threadwatch logo seochat tools logo