Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Mar 2006
    Posts
    478
    Thanks
    3
    Thanked 0 Times in 0 Posts

    how to stretch a css background image height ways

    below is the code i am using at the moment for my menu buttons

    but now i have buttons that need two lines to display the menu items name.

    so need to have the height of button be automatic to the content of the TD it is in.

    to have the image stretch to the full height of the TD

    how would i do this?


    Code:
    td.menubutton{ background: url(images/menubutton.gif); background-repeat: no-repeat; background-position: center center; text-align: center; }
    Attached Thumbnails Attached Thumbnails how to stretch a css background image height ways-menubutton.gif  

  • #2
    Regular Coder
    Join Date
    Oct 2008
    Posts
    130
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Sorry, I didn't know what you were talking about. Disregard this post. I thought you meant bg image of body.
    Last edited by GardenGnome2; 11-16-2008 at 02:27 PM.

  • #3
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts
    Afaik, not possible for background images.

    Just Make the image taller in photoshop.

    Regards,
    Last edited by Doctor_Varney; 11-16-2008 at 06:50 PM.
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    829
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Might see if you can get these to work using the CSS code for the body to stretch background image full page. It only works with a 100% x 100% html/body so probably can't apply it the way you want: http://www.cssplay.co.uk/layouts/background Be glad when browser implement CSS3 where this property will be supported for background images.
    ☠ ☠RON☠ ☠


  •  

    Posting Permissions

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