You’re reading all articles tagged 'webkit'

Moving navigation solved

04 May 2006

One of the headaches I’ve had with the position: fixed navigation on the journal pages is a bug that has reared its head in WebKit based browsers (Safari, Omniweb, NetNewswire etc).

OK, a little background. To avoid the IE flicker problem, my navigation’s rollover states are set as the background of a list item in a numbered list, and the ‘normal’ state is set as the background of the link. On hover the link background is set to none – revealing the rollover state below. With me so far?

When combined with position:fixed, the nav had a strange effect when scrolling. As you scroll down, the background of the anchor tag scrolls with it, but not the background of the <li> item:

Progressive screenshots showing navigation problem in Safari

This didn’t occur in Firefox or Opera (IE doesn’t support position:fixed of course, so it gets position:absolute instead), just in WebKit browsers. It’s a minor, but irritating problem.

The fix was not, as I thought it might be, applying background-attachment: fixed, but just this:

#nav ol a  { position: absolute; }

I’m posting it here in case anyone else has come across it too. A bug in WebKit? Trouble is, when you’re bending CSS to do thing it wasn’t designed to do (Image replacement and fixed positioning) it may not be.


Instagram Hickstagram

  • 19 Jun 2018

  • 17 Jun 2018

    There’s something I love about this bit of road coming into Leafield

  • 09 Jun 2018

    Ride out to Kelmscott to test the new frame! Nice 40 mile loop in the sunshine ☺️

  • 09 Jun 2018

    The things you find on Freecycle. Tempted to reply that the council might want it back?

  • 09 Jun 2018

    Lovely morning dog walk at North Leigh Common

  • 07 Jun 2018

    Signs of wife

  • 30 May 2018

    O triptych

  • 28 May 2018

    Today’s working view

  • 24 May 2018

    Waiting…

  • 23 May 2018

    Dozing off

Contact us

Call Jon on +44 (0)7917 391536, email or tweet @hicksdesign.

Alternatively, pop in for tea and cake at the studio…

Hicks
Wenrisc House
Meadow Court
Witney, OX28 6ER
United Kingdom