Background Image Height & Width

Posted on 2005-04-15
Last Modified: 2012-08-14
Can I modify the height and width of a background image:

<tr style="background:url(../images/side_curve.jpg) no-repeat fixed;">

Question by:yourbudweiser
    LVL 13

    Accepted Solution


    what you can do is make it the background image of an element, such as a div, and then change the size of the div.  This won't resize the image, but it will show only the part of the image you want to show.
    LVL 9

    Expert Comment

    You can't scale your background image only make it repeat itself

    These are the properties you can use on the background:
      and background

    You can read about the "background" on:

    ~ Jakob E
    LVL 3

    Author Comment

    I was coming to that conclusion... can you provide a code sample so that I can resize to say, width=82" and height=521 ?

    Would appreciate that!
    LVL 13

    Expert Comment


    <div style="background: transparent url(images/image.gif) no-repeat top left; height: 521px; width: 82px;"></div>

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Most web designers often experience crossbrowser issues during interface design / development.  On common problem is with Internet Explorer due to its rendering discrepancies between previous versions.  Here are some techniques I use to help avoid c…
    So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
    In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
    In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

    754 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

    21 Experts available now in Live!

    Get 1:1 Help Now