Log in

View Full Version : Navbar positioning in Safari



ember
04-01-2008, 04:37 PM
Hey all,

I have a navigation bar on my blog that is created using an unordered list with rollovers and all. It appears correctly in most browsers I can think of (including IE6) but i couldn't figure out why Safari just wouldn't get its positioning right.

If you could take a look my navbar here (http://tehcpeng.net) in Safari, you'd notice that its about 2-3px above where its supposed to be.

Maybe its helpful to point out that I used position:relative for positioning and that negative margins were also used.

Any ideas?

Thanks in advance!

Medyman
04-02-2008, 03:02 AM
Hmm...the problem doesn't pop out at me right away.

I don't usually advocate using hacks, but if it's just one thing for one browser, it might be easier than finding a workaround:

http://www.ibloomstudios.com/articles/safari_css_hack/

ember
04-02-2008, 03:49 PM
Thanks for the tip!

I'm currently placing browser specific styles as a last resort. If all fails that is. Until then, I hoping there could be fix for it.

Medyman
04-02-2008, 06:05 PM
Adding your navbar with a more standard approach would probably fix the problem.

All those negative margins, you're bound to be off by one or two pixels here and there with the way that different browsers render empty space etc...

ember
04-04-2008, 04:18 PM
I agree. I might try rewriting the whole of that navbar and header part. Hopefully things would work out then.

But for now, I edited the 1px line out of my rollover gifs and reduced the negative margins by 1px. Seems to work in Safari as a temporary solution. =)