Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS resize background DONT preserve aspect ratio

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37434
    dschneid
    Member

    Hello,

    I would like it so that in my menu, when you hover over it, a background image appears (it’s a travel website, so say a suit case). However, the menu tabs are different widths, but the same height. So I want ONLY the background width to resize depending on which tab. See the website and my current css, it covers the whole thing, I can’t seem to think of anything that purely controls the width here. What are my options?

    acoupletravelers.com

    .mainnav li a:hover {
    color:white;
    text-decoration:underline;
    background:url(blue/suitcase_orange.png) no-repeat;
    background-size: cover;
    }

    thanks!

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.