CSS Ellipsis Beginning of StringI was incredibly happy when CSS
text-overflow: ellipsis (married with fixed
text-overflow: ellipsis feature is great but is essentially meant to ellipsize strings only at the end; what if we want to ellipsize the beginning of a screen? The use case is fairly reasonable: think displaying a file path -- many times the directory for a set of files is the same, in which case you'd want to display the end of the string, not the beginning.
Let me show you a trick for ellipsis at the begging of the string!
Showing an ellipsis at the front of a string is mostly the same as ellipsis at the end, only with one simple trick:
/* Standard CSS ellipsis */
/* Beginning of string */
To add an ellipsis at the beginning of a string, use RTL and and
text-align to clip the beginning of the string!
Playing RTL off of
text-align is a genius way to get the desired effect of CSS ellipsis at the beginning of an element or string. It would be great for the CSS spec to implement a more robust ellipsis system but, for now, I worship amazing CSS tricks like this!
One event that's always been lacking within the document is a signal for when the user is looking at a given tab, or another tab. When does the user switch off our site to look at something else? When do they come back?
When you say or read "HTML5", you half expect exotic dancers and unicorns to walk into the room to the tune of "I'm Sexy and I Know It." Can you blame us though? We watched the fundamental APIs stagnate for so long that a basic feature...
One interesting aspect of web development is geolocation; where is your user viewing your website from? You can base your language locale on that data or show certain products in your store based on the user's location. Let's examine how you can...
Increase the font size, follow a link to another web page on same site and … back...