I know how to create arrows outside the div by using the psedo class but I need to create a arrow inside the div as shown below

How can I get this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No need to use extra elements, this can be done entirely using CSS3:
Demo (with vendor-prefixes: http://jsfiddle.net/rLZkf/1/).
Explanation of a this triangle technique
As seen in the image below source, CSS supports linear colour gradients using a simple syntax.
With some imagination, you can see a triangle in the previous image. The colour blends at the diagonal though. So, we set explicit colour stop locations. When these locations are equal, there’s no visual blending any more, and you get a solid triangle.
It’s time to introduce a triangle:
The gradient starts at the bottom-left corner, and ends at the upper-right corner due to the angle of 45°. The colour stop location is defined to be 50%, so the bottom-left part of the triangle is transparent, and the other half is black. To get a different triangle, use an angle of 135°. Here’s an image with both angles:
At this point, we know how to create a rectangular triangle. To get further, we need to be able to create a triangle where the hypotenuse is placed vertically or horizontally. To achieve this, we join two triangles. CSS3 introduces support for multiple backgrounds. This feature is used to construct the triangle.
In the previous CSS code, one can see that I’m using
75%as a colour stop location (instead of50%). This choice does not matter, the final shape of the triangle is determined by the values of the gradient’s colour stop location,background-positionandbackground-size.**Note: I left out the vendor prefixes in the explanation. To use this technique, you have to add the vendor-prefixes (as seen in the demo).
Relevant documentation
linear-gradientbackground-positionbackground-sizebackground-repeat