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.

jamezb3

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Hi,
     
    I have created a very simple and easy to configure CSS Image Rollover Tutorial that uses only one image so there's no loading times for the rollover states, resulting in smoother transitions.
     
    It works by containing the normal and rollover states in one image, we simply use the css to move the image into it's hover state when a mouse is rolled over (see attached image). It's all controlled by ul and li html.
     
    I have included a .zip containing the source with comments and the image used so you can see how it works and tweak it to suit your needs.
     
    CSS Code:

    <style type="text/css"> #navigation ul { width: 320px; height: 30px; position: absolute; top: 100px; left: 300px; background: url(menu.jpg) no-repeat 0 0; list-style: none; margin: 0; padding: 0; } #navigation li { display: inline; } #navigation li a:link, #navigation li a:visited { border: none; width: 80px; height: 30px; display: block; position: absolute; top: 0; text-indent: -7000px; outline: none; } #navigation li.blue a:link, #navigation li.blue a:visited { left: 0; } #navigation li.green a:link, #navigation li.green a:visited { left: 80px } #navigation li.orange a:link, #navigation li.orange a:visited { left: 160px } #navigation li.red a:link, #navigation li.red a:visited { left: 240px } #navigation li.blue a:hover { background: url(menu.jpg) no-repeat 0 -30px; } #navigation li.green a:hover { background: url(menu.jpg) no-repeat -80px -30px; } #navigation li.orange a:hover { background: url(menu.jpg) no-repeat -160px -30px; } #navigation li.red a:hover { background: url(menu.jpg) no-repeat -240px -30px; } </style>
     
    HTML:

    <div id="navigation"> <ul> <li class="blue"><a href="#">Blue</a></li> <li class="green"><a href="#">Green</a></li> <li class="orange"><a href="#">Orange</a></li> <li class="red"><a href="#">Red</a></li> </ul> </div>
     
    Image: (Attached)
     
    Live example: Click here
     
    Easy as that! As I say the .zip contains comments within the stylesheet so you know what each element does.
     
    Any questions let me know.
     
    Hope you find a it useful

    CSS_Image_Rollover_Tutorial.zip

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.