If you want truly straight lines at whatever angle, you might want to explore SVG. Diagonal arrow usage for table sorting Triangle up and down representing both states or ordering The fastest and most understandable is probably the diagonal arrow ââï¸ âï¸â â¬â¬ but in design it is honestly not the prettiest. Approach: A basic algorithm and similar approach will be used for both of the following examples. The column sorting is a commonly used feature on the web application. I want to add those grey "drop down" sorting arrows at the top of each column. Hi Allan and Pawelchmara, I had the same issue. Then the correct arrow is added to the column's text depending on the sort direction. Certificates. This one was top of the list: CSS-Tricks CSS Triangle | CSS-Tricks. Tried the fix listed above but still am showing two sort arrows on each column. Use up or down arrow to represent âsort ascendingâ at table header. REPORT ERROR. HTML You can make them with a single div. You can also create full css arrows as big as container. Also take a look how arrow was created with :after pseudo element. CSS Reference CSS Browser Support CSS Selector Reference Bootstrap 3 Reference Bootstrap 4 Reference W3.CSS Reference Icon Reference Sass Reference. To add the column sorting functionality, the HTML table style needs to be changed. This is just a simple div with 20 pixels border, each with different color. No extra server requests, no bandwidth consumer and is easy to do. The sort indicator is missing on the default sort column. Usually you must set the color for the mirrored border of the one you want to create. CSS. As you can see in the image above, if only one border is set with a color and the rest are set with transparent color and same size, border will expand as a triangle. Posted on April 8, 2015 in HTML/CSS Category with Easy Difficulty, Home â HTML/CSS â CSS Arrows (Up, Down, Left and Right Triangle). HTML Code: