Setting a Background with Images that are Stretched instead of tiled?

Posted on 2006-06-05
Last Modified: 2010-04-25
This should be an easier one for you guys. You know when you set a background as an image, it tiles, leaving multiple overlapping pictures. But what do I do if I want the picture stretched instead? I appreciate your help. Thanks guys.
Question by:AllHale
    LVL 29

    Accepted Solution

    Like on Windows desktop wallpaper you mean?
    Hmmm you can use CSS and set the BG to not tile but it will only be the size of your original image.
    Perhaps you could use Javascript to size the image to be the available height and available width of the clients resolution.
    Could look ugly though.
    LVL 70

    Expert Comment

    by:Jason C. Levine
    Hi AllHale,

    QPR is right on both counts.  You cannot use CSS to stretch the image, but you can use it to not repeat the image.  You could use javascript to detect window size or screen resolution and set the image properties that way, but it is not reliable at all.

    Author Comment

    Thanks guys. Once again you come to my aid, and also reveal the limitations of the software. I'll do my best to make the pictures work.
    LVL 70

    Expert Comment

    by:Jason C. Levine
    It's not a limitation of the software, it's a limitation in HTML/CSS protocols...

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Suggested Solutions

    Title # Comments Views Activity
    Simple PHP Upload Script 11 2,650
    Dreamweaver CS5.5 Error 5 529
    removing xml elements and children 5 520
    Dreamweaver CC + PhoneGap on Windows PC for IOS 1 222
    Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
    This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now