Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

one background image for hover links with different width (size)

Featured Replies

Hi

I have a menu with some links and also a background image that's as wide as widest link.

so how should I style a:hover declaration that the background shrinks from its center and both sides of it is shown for narrow links anyway?

 

background image is like this : 2rxbcxi.gif

 

Regards...

Use a sliding doors effect, cut he image in half and do something like this with the css.

.nav li {
    background:url(right-bg.png) right no-repeat;
    width:100px;
    text-align:center;
}
.nav li a {
    background:url(leftt-bg.png) left no-repeat;
}

  • Author

Use a sliding doors effect, cut he image in half and do something like this with the css.

.nav li {
    background:url(right-bg.png) right no-repeat;
    width:100px;
    text-align:center;
}
.nav li a {
    background:url(leftt-bg.png) left no-repeat;
}

Thanks for quick reply :)

may I use your trick for "mouse over" only? How?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.