When working with a new view on a client’s site, I decided the multi-page grid needed some quick and easy navigation to jump between the layouts.
Enter stage left: Douglas Bowman’s Sliding Doors of CSS courtesy of ALA.
I added two tabs to my new view, repositioned them on the right side — which took some fancy footwork because this awesome technique only demonstrated the tabs as left-justified — and started the browser testing. With some minor edits to the CSS, my new tabs worked perfectly in almost uniform fashion, except in IE7. The browser correctly interpreted both of these declarations, including the Holly Hack (a.k.a. the Be Nice to Opera rule), previously undetected by IE.
#tabbednav ul { margin: 0; }
html>body #tabbednav ul { margin-bottom: -10px; }
A post on Zeldman.com helped me figure this one out, and allowed me to specify rules using a modified Holly Hack. This declaration targets Opera and Mozilla browsers, but all versions of IE don’t see it, including IE7:
html>/**/body #tabbednav ul { margin-bottom: -10px; }
Thanks to Zeldman and donovan.
Update @ nearly 4PM:
After further testing, Safari picks up my modified Holly Hack and improperly renders my tabs. I guess I’m going back to the drawing board.
Update @ just a bit before 4PM:
Ok, final update. I promise. In the end, I was able to make some modifications to one other rule and didn’t end up needing the negative margin. If anyone knows more about this “/**/” hack, ping me, I’m curious now.












No comments
Jump to comment form | Comments RSS | Trackback URI