PDA

View Full Version : css help!


Gary Glass
Jan-02-2006, 02:52 PM
Help! I’m having a CSS problem that I cannot figure out. Can you guys help me out? Here’s the deal. I want the albumNav in my galleries to have a background image. But that makes the pageNav buttons disappear in IE. So I stole a workaround from your smugmugBlack.css which fixes that problem, but when I do it the shopping cart buttons stop working in Firefox. Here’s the code I’m trying:

div.albumNav {
background-image: url(http://garyglass.smugmug.com/photos/50515427-O.jpg); (http://garyglass.smugmug.com/photos/50515427-O.jpg%29;)
}
.pageNav {
/* IE bugfix for disappearing pageNav buttons - but in firefox this breaks the shopping cart links */
position: relative;
}

The only workaround I’ve come up with is to put in javascript to check the navigator.appVersion & set the position:relative style only when it’s IE. But if there’s another way to make it work, that’d be better, of course. Any ideas?

Andy
Jan-02-2006, 02:58 PM
Thanks for posting, Gary.
Mike will be along - I'm not sure if this is do-able or not. But this is the place to find out!

:wave

Andy
Jan-02-2006, 03:01 PM
WOW your site has changed - from great to most-excellent! :clap

Mike Lane
Jan-02-2006, 03:04 PM
I'm not sure I can visualize what you're doing or why there is a problem. But the first thing that you can do is to hack IE using this (I'm copying your code and highlighting my fix in red):

div.albumNav {
background-image: url(http://garyglass.smugmug.com/photos/50515427-O.jpg); (http://garyglass.smugmug.com/photos/50515427-O.jpg%29;)
}
.pageNav {
/* IE bugfix for disappearing pageNav buttons - but in firefox this breaks the shopping cart links */
_position: relative;
}

Read more about the underscore hack (http://wellstyled.com/css-underscore-hack.html).

Gary Glass
Jan-02-2006, 03:14 PM
WOW your site has changed - from great to most-excellent! :clap

Thanks!

Gary Glass
Jan-02-2006, 03:22 PM
Thanks, Mike. That works like a charm.