First, I realize pseudo-elements aren't part of the DOM and thus can't be targeted with jQuery. I'm wondering if perhaps there's another way (pure css, or some creative use of jQuery) to set a property of an :after pseudo-element (border-width, in this case) to be dependent on the parent element's width.
I'm styling a navigation menu using the technique described in this article, but would like to have the triangular shaped part be the full width of the navigation element:
However, the navigation elements won't all or always be the same width, thus the need to set the border-width based on the parent element's width. Any suggestions on how to accomplish this?
Edit: added a jsfiddle demo: http://jsfiddle.net/bcAQc/1/
Note: for some reason, I had to just different values for top and left on the :after pseudo element in jsfiddle than on my site. On my site, and in the example article I linked above, top is set to 100% and left is set to 50%.