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.

Rollover image btns

Featured Replies

Hi,

 

I'm trying to use this method to create a rollover image button with CSS.

 

But it's not working for some reason.

 

I'm trying to create a horizontal nav bar using an image which is 28px high and 288px wide.

 

So the inactive state is the first 144px and the rollover state is 144- 288px.

 

The code I'm using is as follows:

 

#navbar {

position:absolute;

top: 200px;

left: 300px;

font-family:Arial, Helvetica, sans-serif;

font-size:.8em;

font-weight:bold;

height:28px;

}

#navbar li {

list-style:none;

display:inline;

}

#navbar a {

width:108px;

height: 28px;

color:#fff;

text-decoration:none;

background:url("btnmasterH.jpg") no-repeat;

float:left;

padding:6px 0px 0px 32px;

margin:0px 0px;

}

#navbar a:hover {

background-position:0px -144px 0px 0px;

color:#1e5ebd;

}

/*#navbar a:active {

background-position:0 0px;

color:#1e5ebd;

}*/

 

Thanks for any advice.

 

Jo

just out of interest can we see he source for the menu.

 

you MUST include an <a> for CSS to treat this properly if I remember right.. so:

 

<li><a href="#">Menu Item Here</a></li>

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.