Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-18-2012, 10:08 PM   PM User | #1
surfbird0713
New Coder

 
Join Date: Jun 2012
Location: South Carolina
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
surfbird0713 is an unknown quantity at this point
1px shift is driving me crazy!

Can anyone figure out why the first two navigation items cause a 1 pixel shift to the left on hover?

http://cookware.lecreuset.com/cookwa...0002&langId=-1

It's making me nuts. I know the CSS classes are being applied by JavaScript but everything I've tried to change/remove does not affect it.
surfbird0713 is offline   Reply With Quote
Old 10-18-2012, 11:03 PM   PM User | #2
patryk
Regular Coder

 
patryk's Avatar
 
Join Date: Oct 2012
Location: /dev/couch
Posts: 395
Thanks: 2
Thanked 64 Times in 64 Posts
patryk is on a distinguished road
border thikness
i was fighting with something very simmilar
sollution: change element's width when applying borders

Last edited by patryk; 10-18-2012 at 11:06 PM..
patryk is offline   Reply With Quote
Old 10-18-2012, 11:57 PM   PM User | #3
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
Just remember that the actual width of an element is the sum of its

Width + padding + margins + borders

if you add more padding, make the width smaller.
You add 2px of border - take 2 px off the width
aaronhockey_09 is offline   Reply With Quote
Old 10-19-2012, 08:04 PM   PM User | #4
surfbird0713
New Coder

 
Join Date: Jun 2012
Location: South Carolina
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
surfbird0713 is an unknown quantity at this point
Hmm, there isn't a width applied, but when I apply one, I still see the jump. Plus, it only happens on the first two menu items, not the rest.
Also, I can't set a fixed a width for these list items because they could change - the first item has a class "first" applied to it, but sometimes the first item has 5 characters and others it could have 15...

Could it be anything else?
surfbird0713 is offline   Reply With Quote
Old 10-19-2012, 10:52 PM   PM User | #5
aaronhockey_09
Regular Coder

 
Join Date: Dec 2010
Posts: 411
Thanks: 21
Thanked 55 Times in 55 Posts
aaronhockey_09 is an unknown quantity at this point
Im actually not seeing any jump
The only thing i can see is a very small gap between the dropdown and the list item itself ( but thats just because of the rounded corner. )
aaronhockey_09 is offline   Reply With Quote
Old 10-20-2012, 12:11 AM   PM User | #6
Custard7A
Regular Coder

 
Custard7A's Avatar
 
Join Date: Jul 2010
Location: Australia
Posts: 269
Thanks: 32
Thanked 32 Times in 32 Posts
Custard7A is an unknown quantity at this point
I'm only seeing a jump on the first navigation element. Your abundance of inheritance selectors in the related CSS make it rather hard for me to analyze, I can tell I would be there a while trying to link everything together.

Thought I would just say — and considering varied reports on the problem — it might be some default styling on the li, or maybe even the ul element. Y'know, like some tiny padding or something that one or two browsers throw in or mess with, that isn't meshing well with your hover styling. You could try zero-ing out or setting whatever you can think of that might move it.
Custard7A is offline   Reply With Quote
Reply

Bookmarks

Tags
css, hover, javascript

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:45 PM.


Advertisement
Log in to turn off these ads.