Trying to replicate the Google-style toolbar found on G-mail and other Google services has been a challenge for me.
I have experimented with creating this toolbar using a formatted list and nested div elements within a single container, but I encounter the same issue each time.
Whenever the mouse hovers over an element, a new 1px border appears and causes all the other elements to shift. To counteract this, I have had to apply styles like:
left: -1px;
bottom: 1px;
While this works for the element being hovered over, it creates an unsightly movement of the other elements.
My question is: Is there a way to display these elements so that a new 1px border on hover does not affect the positioning, all without using absolute positioning?
If the only solution is absolute positioning with specific pixel coordinates, then I will proceed in that manner. However, I am hoping for a more elegant and efficient solution.