I would like to out the face (pipesmoking man) on this page underneath every .selected-class. I´m using sprites for my main menu and expects this to be the cause that I cant get the :before element to work. Otherwise I´m guessing a positioning issue
Hope one of you guys have the time to help me out here
You´re right… have worked on it and therefore it´s gone now…
Guess my question is as simple as:
How is it possible to position an image underneath the speechbubble (which becomes visible when class .selected is active). Used sprites and therefore it´s all a matter of positioning, and was thinking that a :before pseudo would be a piece of cake connecting it to the LI-element in the menu-div. It just isn´t. Could it be something with my selectors?
The trick is to give position: relative to the parent element you are positioning it in relation to, and then position: absolute to the element (or pseudo element) being positioned.
So whether you are placing the image in relation to the LI, or the <a>, give that element position: relative. This sets the positioning context for the absolutely positioned element. then you can use left and top settings to move the image where you want.