Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Background size

  1. #1
    Join Date
    Oct 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Background size

    I m creating a background image but dont know the proper size to use. Am using jpg and having tiles effect, i.e repeating background. Any infomation on this is appreciated.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Hmmm?

    There are complex CSS styles and such that would allow, for example, to have a background image resize to fit the size of the page.

    But... generally... it's just an image and that's all you need to put in the html.... defaults from there.

    If you like as is, then that's fine.

    If you don't, then what would you like to fix/achieve?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2006
    Location
    미네소타, 미국
    Posts
    158
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    i need a script to strech the bgimage also

  4. #4
    Join Date
    Oct 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Blog background image

    Problem is i'm not good at css, so probably the template i use has the tile effect which isnt what i want since i am creating my own background image. Stretching or shrinking the image to fit the page will blurr the image yeah? Think i will have to read the basic css page for help.

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Just put this in the HTML page, it will tile it and wont distort your image..

    Code:
    <style type="text/css">
    body {
      background-image: url(path/to/the/image.jpeg);
      background-color: red; /* Ought to be as similar to the
                                predominent colour of the background
                                image as possible.
                             */
    }
    </style>
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Oct 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Background image

    Oh but i dont want tiled background because the one i use is not suitable for repeated pattern therefore i tot i could use an image that fits closely to the screen size. How abt css to auto adjust the size to fit?

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    not sure what the code is myself. Google would find it. Or just wait and see if someone tells you.

    However, I should note--
    background-color: red;
    is wrong... should be:
    background-color: #FF0000;

    Hexidecimal colors are more valid than just the name. Yes, the name "works"... but isn't the official way. I think it's going to be phased out with the next update to html, but not sure. Just heard that in passing, I think.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  8. #8
    Join Date
    Oct 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Background image

    ok...if someone can identify this problem of mine...there seems to have sorta right margin in the page that any image that span beyond that will be cut off and tile will appear after that invisible margin, Unless i align the image using positioning method. i really hate to do that because i want to use a single image to cover the entire page. Maybe someone whould like to look into my source of the page and see whether any other part of the html causes that margin problem. http://www.freewebs.com/jewellim/ juz in the testing stage so the webpage is still far from completion.

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    background: white url(some.jpg) center no-repeat;
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Oct 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33
    Hmmm?

    There are complex CSS styles and such that would allow, for example, to have a background image resize to fit the size of the page.
    does anyone this complex css? i need a script that would either make a background image fit to any window or show a different image depending on screen resolution. does anyone know if there is such a script?

Bookmarks

Posting Permissions

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